StatisticsController { @RequestMapping(value = "/projects_per_status", method = RequestMethod.GET) public List<BarChartStatisticsResult> getProjectsPerStatus () { return statisticsService.getProjectsPerStatus(); } @Autowired  StatisticsController(StatisticsService statisticsService); @RequestMapping(value = "/current", method = RequestMethod.GET) List<LineChartStatisticsResult> getCurrentStatisticsResult(
            @RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime startDate,
            @RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime endDate); @RequestMapping(value = "/projects_per_status", method = RequestMethod.GET) List<BarChartStatisticsResult> getProjectsPerStatus(); @RequestMapping(value = "/comment_count_per_project") List<BarChartStatisticsResult> getCommentCountPerProject(@RequestParam(defaultValue = "5") int projectCount); @RequestMapping(value = "/comments/sum", method = RequestMethod.GET) List<LineChartStatisticsResult> getSumComments(
            @RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime startDate,
            @RequestParam @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) DateTime endDate);  }
@Test public void getProjectsPerStatus_shouldCallStatisticsService() throws Exception { when(statisticsService.getProjectsPerStatus()).thenReturn(Collections.emptyList()); mockMvc.perform(get("/statistics/projects_per_status") .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().is(200)); }