@Test
public void testOneLeggedFactsAsPropsCanGetProperties() {

  UUID objectId = UUID.randomUUID();
  ObjectRecord objectRecord = new ObjectRecord().setId(objectId);
  FactTypeStruct factType1 = mockFactType("factType1");
  FactTypeStruct factType2 = mockFactType("factType2");
  FactRecord fact1 = new FactRecord().setTypeID(factType1.getId()).setValue("factValue1");
  FactRecord fact2 = new FactRecord().setTypeID(factType2.getId()).setValue("factValue2");
  when(securityContext.hasReadPermission(any(FactRecord.class))).thenReturn(true);
  when(objectFactDao.searchFacts(argThat(x -> Objects.equals(x.getObjectID(), set(objectId))))).thenReturn(
          ResultContainer.<FactRecord>builder().setValues(ListUtils.list(fact1, fact2).iterator()).build()
  );
  List<PropertyEntry<?>> props = helper.getOneLeggedFactsAsProperties(
          objectRecord,
          TraverseParams.builder().setIncludeRetracted(true).build());
  assertEquals(2, props.size());
  assertEquals(set("factType1->factValue1", "factType2->factValue2"), asKeyValueStrings(props));
}