use of org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails in project incubator-rya by apache.
the class MongoDetailsAdapterTest method toDBObject_pcjDetails_missing_optionals.
@Test
public void toDBObject_pcjDetails_missing_optionals() {
final PCJDetails details = PCJDetails.builder().setId("pcjId").build();
// Convert it into a Mongo DB Object.
final BasicDBObject dbo = (BasicDBObject) MongoDetailsAdapter.toDBObject(details);
// Convert the dbo back into the original object.
final PCJDetails restored = MongoDetailsAdapter.toPCJDetails(dbo).build();
// Ensure the restored value matches the original.
assertEquals(details, restored);
}
Aggregations