### Question:
EcoNewsCommentServiceImpl implements EcoNewsCommentService { @Override public int countOfComments(Long ecoNewsId) { return ecoNewsCommentRepo.countOfComments(ecoNewsId); }  @Override AddEcoNewsCommentDtoResponse save(Long econewsId, AddEcoNewsCommentDtoRequest addEcoNewsCommentDtoRequest,
                                             User user); @Override PageableDto<EcoNewsCommentDto> findAllComments(Pageable pageable, User user, Long ecoNewsId); @Override PageableDto<EcoNewsCommentDto> findAllReplies(Pageable pageable, Long parentCommentId, User user); @Override void deleteById(Long id, User user); @Override @Transactional void update(String text, Long id, User user); void like(Long id, User user); @Override @Transactional int countLikes(Long id); @Override int countReplies(Long id); @Override int countOfComments(Long ecoNewsId); @Override PageableDto<EcoNewsCommentDto> getAllActiveComments(Pageable pageable, User user, Long ecoNewsId);  }### Answer:
@Test public void countComments() { Long ecoNewsId = 1L; when(ecoNewsCommentRepo.countOfComments(ecoNewsId)).thenReturn(0); assertEquals(0, ecoNewsCommentService.countOfComments(ecoNewsId)); }