@Test
public void testMetaFactsAsPropsWithoutReadPermission() {

  FactTypeStruct factType = mockFactType("someFactType");
  FactTypeStruct metaFactType = mockFactType("metaFactType");
  UUID factId = UUID.randomUUID();
  FactRecord fact = new FactRecord().setTypeID(factType.getId()).setValue("someFact").setId(factId);
  FactRecord metaFact = new FactRecord().setTypeID(metaFactType.getId()).setValue("metaFactValue").setId(UUID.randomUUID()).setInReferenceToID(fact.getId());
  when(securityContext.hasReadPermission(any(FactRecord.class))).thenReturn(false);
  when(objectFactDao.searchFacts(argThat(x -> Objects.equals(x.getInReferenceTo(), set(factId))))).thenReturn(
          ResultContainer.<FactRecord>builder().setValues(ListUtils.list(metaFact).iterator()).build()
  );
  List<PropertyEntry<?>> props = helper.getMetaFactsAsProperties(fact, TraverseParams.builder().build());
  assertEquals(0, props.size());
  verify(securityContext).hasReadPermission(metaFact);
}