}
}
@Test
public void testSupportsRdfIdImpl() {
SupportsRdfId aImpl = new SupportsRdfIdImpl();
URI aTestURI = URI.create("urn:some:identifier");
assertNull(aImpl.getRdfId());
aImpl.setRdfId(asPrimaryKey(aTestURI));
assertEquals(aImpl.getRdfId(), asPrimaryKey(aTestURI));
try {
aImpl.setRdfId(asPrimaryKey(URI.create("urn:new:id")));
fail("IllegalStateException expected");
}
catch (IllegalStateException e) {
// this is expected
}
assertEquals(aImpl, aImpl);
assertFalse(aImpl.equals(null));
assertFalse(aImpl.equals(""));
assertEquals(aImpl, new SupportsRdfIdImpl(aTestURI));
assertEquals(aImpl.hashCode(), new SupportsRdfIdImpl(aTestURI).hashCode());
assertFalse(aImpl.equals(new SupportsRdfIdImpl()));
assertFalse(aImpl.equals(new SupportsRdfIdImpl(URI.create("urn:new:id"))));
}