@Test
public void testToCriteriaWithBidirectionalBinding() {

  FactRecord record = new FactRecord()
          .setTypeID(UUID.randomUUID())
          .setOriginID(UUID.randomUUID())
          .setOrganizationID(UUID.randomUUID())
          .setAccessMode(FactRecord.AccessMode.Explicit)
          .setConfidence(0.1f)
          .setSourceObject(createObjectRecord())
          .setDestinationObject(createObjectRecord())
          .setBidirectionalBinding(true);
  FactExistenceSearchCriteria criteria = converter.toCriteria(record);
  assertEquals(2, criteria.getObjects().size());
  assertTrue(criteria.getObjects().stream().allMatch(o -> FactExistenceSearchCriteria.Direction.BiDirectional == o.getDirection()));
}