assertTrue("Need two pixInfos, please.",p.collectFromPlaneInfo(null).size() == 2); for (PlaneInfo pi : (List<PlaneInfo>)p.collectFromPlaneInfo(null))
assertTrue("Need two pixInfos, please.",p.collectPlaneInfo(null).size() == 2); for (PlaneInfo pi : (List<PlaneInfo>)p.collectPlaneInfo(null))
    public void testNewCollectionFieldOnDetachedPixels() throws Exception    {        // PREPARE -------------------------------------------------        PlaneInfo pi1 = new PlaneInfo(),pi2 = new PlaneInfo();        pi1.setPixels(p);        pi1.setExposureTime(new Float(10));        pi1.setTimestamp(new Float(-11));                pi2.setPixels(p);        pi2.setExposureTime(new Float(100));        pi2.setTimestamp(new Float(-193));                p.addToPlaneInfo( pi1 );        p.addToPlaneInfo( pi2 );        p = (Pixels) iUpdate.saveAndReturnObject(p);        flush();        clear();                // TEST ----------------------------------------------------        assertTrue("Need two pixInfos, please.",p.collectFromPlaneInfo(null).size() == 2);        for (PlaneInfo pi : (List<PlaneInfo>)p.collectFromPlaneInfo(null))        {            assertTrue("Need an id, please.", pi.getId().longValue()>0);        }    }