*/
public class JDOUnownedOneToOneTest extends JDOTestCase {
public void testPersistUniNewBoth() throws EntityNotFoundException {
// Persist A-B as unowned
UnownedJDOOneToOneUniSideA a = new UnownedJDOOneToOneUniSideA();
a.setName("Side A");
UnownedJDOOneToOneUniSideB b = new UnownedJDOOneToOneUniSideB();
b.setName("Side B");
a.setOther(b);
pm.makePersistent(a);
Object aId = pm.getObjectId(a);
Object bId = pm.getObjectId(b);
pm.evictAll(); // Make sure we go to the datastore
// Retrieve by id and check
UnownedJDOOneToOneUniSideA a2 = (UnownedJDOOneToOneUniSideA)pm.getObjectById(aId);
assertNotNull(a2);
assertEquals("Side A", a2.getName());
UnownedJDOOneToOneUniSideB b2 = a.getOther();
assertNotNull(b2);
assertNotNull("Side B", b2.getName());
assertEquals(bId, pm.getObjectId(b2));
}