@Test
public void testConvertFactTypeWithBothSourceAndDestination() {

  FactTypeEntity.FactObjectBindingDefinition binding1 = new FactTypeEntity.FactObjectBindingDefinition()
    .setSourceObjectTypeID(UUID.randomUUID())
    .setDestinationObjectTypeID(UUID.randomUUID());
  FactTypeEntity.FactObjectBindingDefinition binding2 = new FactTypeEntity.FactObjectBindingDefinition()
    .setSourceObjectTypeID(UUID.randomUUID())
    .setDestinationObjectTypeID(UUID.randomUUID())
    .setBidirectionalBinding(true);
  FactTypeEntity entity = createEntity()
    .addRelevantObjectBinding(binding1)
    .addRelevantObjectBinding(binding2);
  FactType model = converter.apply(entity);
  assertModelCommon(entity, model);
  assertNotNull(model.getRelevantObjectBindings());
  assertRelevantObjectBindings(entity, model);
  assertNull(model.getRelevantFactBindings());
}