Exhibit e1 = newExhibit(g1);
Artist a1 = newArtist();
ctxt.commitChanges();
// *** TESTING THIS ***
ArtistExhibit ae1 = (ArtistExhibit) ctxt.newObject("ArtistExhibit");
e1.addToArtistExhibitArray(ae1);
a1.addToArtistExhibitArray(ae1);
// check before save
assertSame(e1, ae1.getToExhibit());
assertSame(a1, ae1.getToArtist());
// save
// test "assertion" is that commit succeeds (PK of ae1 was set properly)
ctxt.commitChanges();
}