// @Test(dependsOnMethods = "complicatedProxySetsSelfEquals")
public void testSetEntityDuplication() {
JavaComplexTestClass test = database.newInstance(JavaComplexTestClass.class);
for (int i = 0; i < 100; i++) {
IdentityChild child = database.newInstance(IdentityChild.class);
child.setName(String.valueOf(i));
test.getDuplicationTestSet().add(child);
}
Assert.assertNotNull(test.getDuplicationTestSet());
Assert.assertEquals(test.getDuplicationTestSet().size(), 1);
database.save(test);
// Assert.assertEquals(test.getSet().size(), 100);
ORID rid = database.getIdentity(test);
database.close();
database = OObjectDatabasePool.global().acquire(url, "admin", "admin");
test = database.load(rid);
Assert.assertNotNull(test.getDuplicationTestSet());
Assert.assertEquals(test.getDuplicationTestSet().size(), 1);
for (int i = 0; i < 100; i++) {
IdentityChild child = new IdentityChild();
child.setName(String.valueOf(i));
test.getDuplicationTestSet().add(child);
}
Assert.assertEquals(test.getDuplicationTestSet().size(), 1);
database.save(test);
rid = database.getIdentity(test);