{
// Resource r = model.createResource( "eh:/rhubarb" );
final UniqueValueClass2 r = new UniqueValueClass2("rhubarb");
Assert.assertNull("not expecting registered RDF Datatype", TypeMapper
.getInstance().getTypeByValue(r));
final Literal typed = model.createTypedLiteral(r); // Sets the type
// mapper -
// contaminates it
// with
// UniqueValueClass2
final Literal string = model.createLiteral(r.value);
Assert.assertEquals(string.getLexicalForm(), typed.getLexicalForm());
Assert.assertEquals(string.getLanguage(), typed.getLanguage());
JenaTestBase.assertDiffer(string.getDatatypeURI(),
typed.getDatatypeURI());
Assert.assertNotNull(
"a datatype should have been invented for Resource[Impl]",
typed.getDatatype());
JenaTestBase.assertDiffer(typed, string);
JenaTestBase.assertDiffer(typed.getValue(), string.getValue());
Assert.assertEquals(r, typed.getValue());
JenaTestBase.assertDiffer(typed.hashCode(), string.hashCode());
}