CommentCountPerProjectAction { public List<BarChartStatisticsResult> getCommentCountPerProjectStatistic(int projectCount) { return commentRepository.countCommentsGroupByProject(projectCount); } @Autowired  CommentCountPerProjectAction(CommentRepository commentRepository); List<BarChartStatisticsResult> getCommentCountPerProjectStatistic(int projectCount);  }
@Test public void getCommentCountPerProjectStatistic_should_call_repository_method() { instance.getCommentCountPerProjectStatistic(5); verify(commentRepository, only()).countCommentsGroupByProject(5); }