}
public void testStaticResource() {
ResourceRecordFactory factory = new ResourceRecordFactory(new LifecycleManagersRegistry());
ResourceRecord record = factory.getResourceRecord(Resource1.class);
assertEquals("/path1", record.getMetadata().getPath());
record = factory.getResourceRecord(Resource2.class);
assertEquals("/path2", record.getMetadata().getPath());
Resource1 r1 = new Resource1();
ResourceRecord record1 = factory.getResourceRecord(r1);
assertEquals("/path1", record1.getMetadata().getPath());
Object o = record1.getObjectFactory().getInstance(null);
assertTrue(o instanceof Resource1);
record = factory.getResourceRecord(Resource1.class);
assertTrue(record == record1);
o = record.getObjectFactory().getInstance(null);
assertTrue(o instanceof Resource1);
Resource2 r2 = new Resource2();
ResourceRecord record2 = factory.getResourceRecord(r2);
assertEquals("/path2", record2.getMetadata().getPath());
o = record2.getObjectFactory().getInstance(null);
assertTrue(o instanceof Resource2);
record = factory.getResourceRecord(Resource2.class);
assertTrue(record == record2);
o = record.getObjectFactory().getInstance(null);
assertTrue(o instanceof Resource2);