@Test
public void testRetrieveExistingFactsWithoutSearchResult() {

  FactRecord record = new FactRecord();
  FactExistenceSearchCriteria criteria = createFactExistenceSearchCriteria();
  when(factRecordConverter.toCriteria(record)).thenReturn(criteria);
  when(factSearchManager.retrieveExistingFacts(criteria)).thenReturn(SearchResult.<FactDocument>builder().build());
  ResultContainer<FactRecord> container = dao.retrieveExistingFacts(record);
  assertEquals(0, container.getCount());
  assertFalse(container.hasNext());
  verify(factRecordConverter).toCriteria(record);
  verify(factSearchManager).retrieveExistingFacts(criteria);
  verifyNoInteractions(factManager);
}