@Test
public void testMatchesDirectionUniDir() {

  ObjectRecord objectA = new ObjectRecord().setId(UUID.randomUUID());
  ObjectRecord objectB = new ObjectRecord().setId(UUID.randomUUID());
  // objectA -- fact --> objectB
  FactRecord aToBFact = new FactRecord()
          .setId(UUID.randomUUID())
          .setSourceObject(objectA)
          .setDestinationObject(objectB);
  assertTrue(ObjectVertex.matchesDirection(aToBFact, objectA, OUT));
  assertFalse(ObjectVertex.matchesDirection(aToBFact, objectA, IN));
  assertTrue(ObjectVertex.matchesDirection(aToBFact, objectA, BOTH));
  // objectA <-- fact -- objectB
  FactRecord bToAFact = new FactRecord()
          .setId(UUID.randomUUID())
          .setSourceObject(objectB)
          .setDestinationObject(objectA);
  assertFalse(ObjectVertex.matchesDirection(bToAFact, objectA, OUT));
  assertTrue(ObjectVertex.matchesDirection(bToAFact, objectA, IN));
  assertTrue(ObjectVertex.matchesDirection(bToAFact, objectA, BOTH));
}