assertEquals(1, objects.size());
assertTrue("CompoundPainting expected, got " + objects.get(0).getClass(), objects
.get(0) instanceof CompoundPainting);
for (Iterator<?> i = objects.iterator(); i.hasNext();) {
CompoundPainting painting = (CompoundPainting) i.next();
assertEquals(PersistenceState.COMMITTED, painting.getPersistenceState());
Number id = (Number) painting
.getObjectId()
.getIdSnapshot()
.get("PAINTING_ID");
assertEquals("CompoundPainting.getObjectId(): " + id, id.intValue(), 2);
assertEquals("CompoundPainting.getPaintingTitle(): "
+ painting.getPaintingTitle(), "painting" + id, painting
.getPaintingTitle());
assertEquals(
"CompoundPainting.getTextReview(): " + painting.getTextReview(),
"painting review" + id,
painting.getTextReview());
assertEquals(
"CompoundPainting.getArtistName(): " + painting.getArtistName(),
"artist2",
painting.getArtistName());
assertEquals(
"CompoundPainting.getArtistName(): " + painting.getGalleryName(),
painting.getToGallery().getGalleryName(),
painting.getGalleryName());
}
}