@Test
public void testIsRetractedWithRetractedRetraction() {

  FactRecord fact = new FactRecord().setId(UUID.randomUUID()).setFlags(set(FactRecord.Flag.RetractedHint));
  FactDocument retraction1 = new FactDocument().setId(UUID.randomUUID());
  FactDocument retraction2 = new FactDocument().setId(UUID.randomUUID());
  // fact ---> retraction1 ---> retraction2
  // retraction2 cancels out retraction1, thus, fact in not retracted.
  when(factSearchManager.searchFacts(inReferenceTo(fact.getId()))).thenReturn(createSearchResult(retraction1));
  when(factSearchManager.searchFacts(inReferenceTo(retraction1.getId()))).thenReturn(createSearchResult(retraction2));
  assertFalse(handler.isRetracted(fact));
}