@Test
public void testOneLeggedFactsAsPropsFilterRetracted() {

  UUID objectId = UUID.randomUUID();
  ObjectRecord objectRecord = new ObjectRecord().setId(objectId);
  FactTypeStruct factType = mockFactType("factType");
  FactRecord retractedFact = new FactRecord().setTypeID(factType.getId()).setValue("factValue1");
  FactRecord fact = new FactRecord().setTypeID(factType.getId()).setValue("factValue2");
  when(securityContext.hasReadPermission(any(FactRecord.class))).thenReturn(true);
  when(objectFactDao.searchFacts(argThat(x -> Objects.equals(x.getObjectID(), set(objectId))))).thenAnswer(x ->
          ResultContainer.<FactRecord>builder().setValues(ListUtils.list(retractedFact, fact).iterator()).build()
  );
  when(factRetractionHandler.isRetracted(retractedFact)).thenReturn(true);
  when(factRetractionHandler.isRetracted(fact)).thenReturn(false);
  assertEquals(2, helper.getOneLeggedFactsAsProperties(objectRecord, TraverseParams.builder().setIncludeRetracted(true).build()).size());
  assertEquals(1, helper.getOneLeggedFactsAsProperties(objectRecord, TraverseParams.builder().setIncludeRetracted(false).build()).size());
}