@Test public void search_QueryMethodTypeIsUnknown_ShouldReturnEmptyList() { ReflectionTestUtils.setField(service, "queryMethodType", "unknown"); PageRequest page = new PageRequest(1, 1); List<TodoDocument> todos = service.search(SEARCH_TERM, page); verifyZeroInteractions(repositoryMock); assertTrue(todos.isEmpty()); }
@Override public List<TodoDocument> search(String searchTerm, Pageable page) { LOGGER.debug("Searching documents with search term: {} and page: {}", searchTerm, page); return findDocuments(searchTerm, page); }
RepositoryTodoIndexService implements TodoIndexService { @Override public List<TodoDocument> search(String searchTerm, Pageable page) { LOGGER.debug("Searching documents with search term: {} and page: {}", searchTerm, page); return findDocuments(searchTerm, page); } }
RepositoryTodoIndexService implements TodoIndexService { @Override public List<TodoDocument> search(String searchTerm, Pageable page) { LOGGER.debug("Searching documents with search term: {} and page: {}", searchTerm, page); return findDocuments(searchTerm, page); }  }
RepositoryTodoIndexService implements TodoIndexService { @Override public List<TodoDocument> search(String searchTerm, Pageable page) { LOGGER.debug("Searching documents with search term: {} and page: {}", searchTerm, page); return findDocuments(searchTerm, page); }  @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 List<TodoDocument> search(String searchTerm, Pageable page) { LOGGER.debug("Searching documents with search term: {} and page: {}", searchTerm, page); return findDocuments(searchTerm, page); }  @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);  }