assertTrue("Fully initialized",Hibernate.isInitialized(img.getDatasets()));
Set ds = img.getDatasets(); assertTrue("Fully initialized datasets",Hibernate.isInitialized(ds)); for (Iterator j = ds.iterator(); j.hasNext();) { Dataset d = (Dataset) j.next(); assertTrue("Fully initialized projects",Hibernate.isInitialized(d.getProjects())); }
    public void testFindPDIHierarchies(){        Set set = getSetFromInt(new int[]{1,5,6,7,8,9,0});        List result = cdao.findPDIHierarchies(set);        assertTrue("Should have found all the images but Zero", result.size()==set.size()+1);        for (Iterator i = result.iterator(); i.hasNext();) {            Image img = (Image) i.next();            assertTrue("Fully initialized",Hibernate.isInitialized(img.getDatasets()));        }            }