@Test
public void testBuildSubsearchTasks() {

    SearchResult searchResult = new SearchResult(searchPolicy, locationTokens);
    Mockito.when(spawnedSearchTaskBuilder.getSearchTasks(searchResult)).thenReturn(expectedTasks);
    List<SearchTask> result = searchTaskFactory.buildSubsearchTasks(searchResult);
    assertThat(result).isSameAs(expectedTasks);
}