@@ -0,0 +1,1610 @@
+package test.unit.haushaltsbuch.web;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.mockito.Matchers.eq;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.when;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport javax.servlet.ServletContext;%0Aimport javax.servlet.ServletContextEvent;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.ArgumentCaptor;%0Aimport org.mockito.Captor;%0Aimport org.mockito.Mockito;%0Aimport org.mockito.MockitoAnnotations;%0Aimport haushaltsbuch.web.MenuInitializer;%0A%0Apublic class MenuInitializerTest%0A%7B%0A  private MenuInitializer _subject;%0A%0A  @Captor%0A  ArgumentCaptor%3CMap%3CString, String%3E%3E captor;%0A%0A  @Before%0A  public void setUp() throws Exception%0A  %7B%0A    _subject = new MenuInitializer();%0A    MockitoAnnotations.initMocks(this);%0A  %7D%0A%0A  @Test%0A  public void testContextInitialized()%0A  %7B%0A    ServletContextEvent event = Mockito.mock(ServletContextEvent.class);%0A    ServletContext ctx = Mockito.mock(ServletContext.class);%0A    when(event.getServletContext()).thenReturn(ctx);%0A%0A    _subject.contextInitialized(event);%0A%0A    verify(ctx).setAttribute(eq(%22menu%22), captor.capture());%0A%0A    Map%3CString, String%3E menu = captor.getValue();%0A%0A    assertNotNull(menu);%0A    assertEquals(4, menu.size());%0A%0A    Map%3CString, String%3E expected = new HashMap%3CString, String%3E(4);%0A%0A    expected.put(%22Home%22, %22.%22);%0A    expected.put(%22Eintr%C3%A4ge%22, %22entries/all%22);%0A    expected.put(%22Eintrag nachschlagen%22, %22entries/lookup%22);%0A    expected.put(%22Neuer Eintrag%E2%80%A6%22, %22entries/new%22);%0A%0A    assertEquals(expected, menu);%0A  %7D%0A%7D%0A

Add test for menu