assertEquals(8, 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();
Number id = (Number) painting
.getObjectId()
.getIdSnapshot()
.get("PAINTING_ID");
assertEquals("CompoundPainting.getPaintingTitle(): "
+ painting.getPaintingTitle(), "painting" + id, painting
.getPaintingTitle());
if (painting.getToPaintingInfo()==null){
assertNull(painting.getTextReview());
}else{
assertEquals("CompoundPainting.getTextReview(): "
+ painting.getTextReview(), "painting review" + id, painting
.getTextReview());
}
assertEquals(
"CompoundPainting.getArtistName(): " + painting.getArtistName(),
painting.getToArtist().getArtistName(),
painting.getArtistName());
if (painting.getToGallery() == null) {
assertNull(painting.getGalleryName());
}
else {
assertEquals("CompoundPainting.getGalleryName(): "
+ painting.getGalleryName(), painting
.getToGallery()
.getGalleryName(), painting.getGalleryName());
}
}
}