@Test public void search_ShouldReturnDocuments() { List<TodoDocument> expected = new ArrayList<TodoDocument>(); when(repositoryMock.search(SEARCH_TERM)).thenReturn(expected); List<TodoDocument> actual = service.search(SEARCH_TERM); verify(repositoryMock, times(1)).search(SEARCH_TERM); verifyNoMoreInteractions(repositoryMock); assertEquals(expected, actual); }
@Override public List<TodoDocument> search(String searchTerm) { LOGGER.debug("Searching documents with search term: {}", searchTerm); return repository.search(searchTerm); }
RepositoryTodoIndexService implements TodoIndexService { @Override public List<TodoDocument> search(String searchTerm) { LOGGER.debug("Searching documents with search term: {}", searchTerm); return repository.search(searchTerm); } }
RepositoryTodoIndexService implements TodoIndexService { @Override public List<TodoDocument> search(String searchTerm) { LOGGER.debug("Searching documents with search term: {}", searchTerm); return repository.search(searchTerm); }  }
RepositoryTodoIndexService implements TodoIndexService { @Override public List<TodoDocument> search(String searchTerm) { LOGGER.debug("Searching documents with search term: {}", searchTerm); return repository.search(searchTerm); }  @Transactional @Override void addToIndex(Todo todoEntry); @Transactional @Override void deleteFromIndex(Long id); @Override List<TodoDocument> search(String searchTerm); @Transactional @Override void update(Todo todoEntry); }
RepositoryTodoIndexService implements TodoIndexService { @Override public List<TodoDocument> search(String searchTerm) { LOGGER.debug("Searching documents with search term: {}", searchTerm); return repository.search(searchTerm); }  @Transactional @Override void addToIndex(Todo todoEntry); @Transactional @Override void deleteFromIndex(Long id); @Override List<TodoDocument> search(String searchTerm); @Transactional @Override void update(Todo todoEntry);  }