String query =
String.format("<info:fedora/%s> <%s> *",
pid,
Constants.MODEL.CREATED_DATE.uri);
TripleIterator results = spo(query);
try {
assertTrue(results.hasNext());
ObjectNode dateNode = results.next().getObject();
assertTrue(dateNode instanceof Literal);
Literal dateLiteral = (Literal) dateNode;
assertEquals(dateLiteral.getDatatypeURI().toString(),
Constants.RDF_XSD.DATE_TIME.uri);
assertEquals(xsdDateTime, dateLiteral.getLexicalForm());
} finally {
results.close();
}
}