@Test
public void testToEntityWithFullRecord() {

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