@Test
public void testInstGen() throws Exception {
Class<TestInterface> aIntClass = InstanceGenerator.generateInstanceClass(TestInterface.class);
TestInterface aInt = aIntClass.newInstance();
// this should successfully re-use the previously generated class file. we want to make sure
// this can happen without error.
TestInterface aInt2 = InstanceGenerator.generateInstanceClass(TestInterface.class).newInstance();
URI aURI = URI.create("urn:uri");
Integer aNumber = 5;
String aStr = "some string value";
SupportsRdfId.RdfKey aKey = new SupportsRdfId.URIKey(URI.create("urn:id"));
SupportsRdfId.RdfKey aKey2 = new SupportsRdfId.URIKey(URI.create("urn:id2"));
aInt.setURI(aURI);
aInt.setInt(aNumber);
aInt.setString(aStr);
aInt.setRdfId(aKey);
aInt2.setRdfId(aKey2);
aInt.setObject(aInt2);
assertEquals(aInt, aInt);
assertEquals(aURI, aInt.getURI());