ID_COUNTER += 4;
createBidirectionalRelation(em, id, createConsistent);
BidirectionalOne2OneOwner owner1 = em.find(BidirectionalOne2OneOwner.class, id);
BidirectionalOne2OneOwned owned1 = em.find(BidirectionalOne2OneOwned.class, id + 1);
BidirectionalOne2OneOwner owner2 = em.find(BidirectionalOne2OneOwner.class, id + 2);
BidirectionalOne2OneOwned owned2 = em.find(BidirectionalOne2OneOwned.class, id + 3);
assertNotNull(owner1);
assertNotNull(owner2);
assertNotNull(owned1);
assertNotNull(owned2);
assertEquals(owner1, expectConsistent
? owner1.getOwned().getOwner()
: owner2.getOwned().getOwner());
assertEquals(owner2, expectConsistent
? owner2.getOwned().getOwner()
: owner1.getOwned().getOwner());
assertEquals(owned1, owner1.getOwned());
assertEquals(expectConsistent ? owner1 : owner2, owned1.getOwner());
assertEquals(owned2, owner2.getOwned());
assertEquals(expectConsistent ? owner2 : owner1, owned2.getOwner());
}