@Test
public void testFromEntityWithDirectFields() {

  FactEntity entity = new FactEntity()
          .setId(UUID.randomUUID())
          .setTypeID(UUID.randomUUID())
          .setValue("value")
          .setInReferenceToID(UUID.randomUUID())
          .setOrganizationID(UUID.randomUUID())
          .setOriginID(UUID.randomUUID())
          .setAddedByID(UUID.randomUUID())
          .setAccessMode(AccessMode.Explicit)
          .setConfidence(0.1f)
          .setTrust(0.2f)
          .setTimestamp(123456789L)
          .setLastSeenTimestamp(987654321L)
          .addFlag(FactEntity.Flag.RetractedHint);
  FactRecord record = converter.fromEntity(entity);
  assertEquals(entity.getId(), record.getId());
  assertEquals(entity.getTypeID(), record.getTypeID());
  assertEquals(entity.getValue(), record.getValue());
  assertEquals(entity.getInReferenceToID(), record.getInReferenceToID());
  assertEquals(entity.getOrganizationID(), record.getOrganizationID());
  assertEquals(entity.getOriginID(), record.getOriginID());
  assertEquals(entity.getAddedByID(), record.getAddedByID());
  assertEquals(entity.getAccessMode().name(), record.getAccessMode().name());
  assertEquals(entity.getConfidence(), record.getConfidence(), 0.0f);
  assertEquals(entity.getTrust(), record.getTrust(), 0.0f);
  assertEquals(entity.getTimestamp(), record.getTimestamp());
  assertEquals(entity.getLastSeenTimestamp(), record.getLastSeenTimestamp());
  assertEquals(SetUtils.set(FactRecord.Flag.RetractedHint), record.getFlags());
}