@Test public void countSearchResults_ShouldReturnResultCount() { when(repositoryMock.count(SEARCH_TERM)).thenReturn(2L); long actual = service.countSearchResults(SEARCH_TERM); verify(repositoryMock, times(1)).count(SEARCH_TERM); verifyNoMoreInteractions(repositoryMock); assertEquals(2L, actual); }
@Override public long countSearchResults(String searchTerm) { LOGGER.debug("Getting search result count for search term: {}", searchTerm); return repository.count(searchTerm); }
RepositoryTodoIndexService implements TodoIndexService { @Override public long countSearchResults(String searchTerm) { LOGGER.debug("Getting search result count for search term: {}", searchTerm); return repository.count(searchTerm); } }
RepositoryTodoIndexService implements TodoIndexService { @Override public long countSearchResults(String searchTerm) { LOGGER.debug("Getting search result count for search term: {}", searchTerm); return repository.count(searchTerm); }  }
RepositoryTodoIndexService implements TodoIndexService { @Override public long countSearchResults(String searchTerm) { LOGGER.debug("Getting search result count for search term: {}", searchTerm); return repository.count(searchTerm); }  @Transactional @Override void addToIndex(Todo todoEntry); @Override long countSearchResults(String searchTerm); @Transactional @Override void deleteFromIndex(Long id); @Override List<TodoDocument> search(String searchTerm, Pageable page); @Transactional @Override void update(Todo todoEntry); }
RepositoryTodoIndexService implements TodoIndexService { @Override public long countSearchResults(String searchTerm) { LOGGER.debug("Getting search result count for search term: {}", searchTerm); return repository.count(searchTerm); }  @Transactional @Override void addToIndex(Todo todoEntry); @Override long countSearchResults(String searchTerm); @Transactional @Override void deleteFromIndex(Long id); @Override List<TodoDocument> search(String searchTerm, Pageable page); @Transactional @Override void update(Todo todoEntry);  }