SearchTaskFactory { public List<SearchTask> buildInitialSearchTasks(SearchPolicy searchPolicy, LocationTokens locationTokens) { return this.initialSearchTaskBuilder.getSearchTasks(searchPolicy, locationTokens); } SearchTaskFactory(InitialSearchTaskBuilder initialSearchTaskBuilder,
      SpawnedSearchTaskBuilder spawnedSearchTaskBuilder); List<SearchTask> buildInitialSearchTasks(SearchPolicy searchPolicy, LocationTokens locationTokens); List<SearchTask> buildSubsearchTasks(SearchResult searchResult);  }
@Test public void testBuildInitialSearchTasks() { Mockito.when(initialSearchTaskBuilder.getSearchTasks(searchPolicy, locationTokens)).thenReturn(expectedTasks); List<SearchTask> result = searchTaskFactory.buildInitialSearchTasks(searchPolicy, locationTokens); assertThat(result).isSameAs(expectedTasks); }