DummySearchService implements SearchService { @Override public ListenableFuture<SearchResponse> extendedSearch(ExtendedSearchRequest request) { SearchResponse response = new SearchResponse(); response.setResultList(Arrays.asList( "result 1", "result 2", "result 3" )); return Futures.immediateFuture(response); }  @Override ListenableFuture<SearchResponse> basicSearch(BasicSearchRequest request); @Override ListenableFuture<SearchResponse> extendedSearch(ExtendedSearchRequest request);  }
@Test public void testExtendedSearch() throws Exception { ListenableFuture<SearchResponse> result = service.extendedSearch(new ExtendedSearchRequest()); Assert.assertEquals(Arrays.asList("result 1", "result 2", "result 3"), result.get().getResultList()); }