@Test
public void testMatchesDirectionBidirectional() {

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