@@ -0,0 +1,2554 @@
+package org.synyx.urlaubsverwaltung.sicknote.statistics.web;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.junit.MockitoJUnitRunner;%0Aimport org.springframework.test.web.servlet.ResultActions;%0Aimport org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;%0Aimport org.synyx.urlaubsverwaltung.sicknote.SickNote;%0Aimport org.synyx.urlaubsverwaltung.sicknote.SickNoteService;%0Aimport org.synyx.urlaubsverwaltung.sicknote.statistics.SickNoteStatistics;%0Aimport org.synyx.urlaubsverwaltung.sicknote.statistics.SickNoteStatisticsService;%0Aimport org.synyx.urlaubsverwaltung.workingtime.WorkDaysService;%0A%0Aimport static java.time.LocalDate.parse;%0Aimport static java.time.format.DateTimeFormatter.ofPattern;%0Aimport static java.util.Collections.singletonList;%0Aimport static org.mockito.Mockito.when;%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.view;%0Aimport static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class SickNoteStatisticsControllerTest %7B%0A%0A    private SickNoteStatisticsController sut;%0A%0A    @Mock%0A    private SickNoteStatisticsService statisticsService;%0A    @Mock%0A    private SickNoteService sickNoteService;%0A    @Mock%0A    private WorkDaysService calendarService;%0A%0A    @Before%0A    public void setUp() %7B%0A        sut = new SickNoteStatisticsController(statisticsService);%0A    %7D%0A%0A    @Test%0A    public void sickNoteStatistics() throws Exception %7B%0A%0A        final int year = 2017;%0A        final SickNoteStatistics sickNoteStatistics = new SickNoteStatistics(year, sickNoteService, calendarService);%0A        when(statisticsService.createStatistics(year)).thenReturn(sickNoteStatistics);%0A%0A        final ResultActions resultActions = perform(get(%22/web/sicknote/statistics%22)%0A            .param(%22year%22, %222017%22));%0A        resultActions.andExpect(status().isOk());%0A        resultActions.andExpect(model().attribute(%22statistics%22, sickNoteStatistics));%0A        resultActions.andExpect(view().name(%22sicknote/sick_notes_statistics%22));%0A    %7D%0A%0A    private ResultActions perform(MockHttpServletRequestBuilder builder) throws Exception %7B%0A        return standaloneSetup(sut).build().perform(builder);%0A    %7D%0A%7D%0A

Add test for SickNoteStatisticsController