Set test = Utils.getImagesinPID(result);
Set test = Utils.getImagesinPDI(result);
    public void testDuplicateImages() {        OMEData data = (OMEData) applicationContext.getBean("data");        Set result = hb.findPDIHierarchies(data.imgsPDI);        Set test = Utils.getImagesinPID(result);        assertTrue("Images in should eq. images out",data.imgsPDI.size()==test.size());                Set noDupesPlease = new HashSet();         for (Iterator i = test.iterator(); i.hasNext();) {            Image img = (Image) i.next();            if (noDupesPlease.contains(img.getImageId()))                 fail("But also the IDs should be unique!");          	noDupesPlease.add(img.getImageId());        }            }