.getNoProxyClassInfo(objectClass);
final ProxyManager2 proxyManager2 = new ProxyManager2(
new ClassLoaderProvider(), classInfoFactory);
final StorageInfo storageInfo = new StorageInfo();
inConstruction = true;
final BobCallInConstructor object = (BobCallInConstructor) proxyManager2
.newInstanceConstruct(classInfo,
new Class<?>[] { String.class },
new Object[] { "a name" }, storageInfo, this,
DataRecordIdentifier.LAST, true);
assertEquals(0, proxyManager2.getInObjectCount(object));
inConstruction = false;
assertTrue("must say is a proxy",
ProxyManager2.isProxyOrEnhanced(object));
assertTrue("must be loaded", ProxyManager2.isLoadedOrNotAProxy(object));
assertEquals("bad object proxied class", objectClass, proxyManager2
.classInfoOfObject(object).getObjectClass());
ProxyManager2.unload(object);
setted = false;
object.setName("a new name");
assertTrue(setted);
}