/** * Uses Nested Search Criteria for search Verifies that the results are returned Verifies size of * the result set Verifies that none of the attribute is null * * @throws Exception */ public void testEntireObjectNestedSearch3() throws Exception { CRTMonitor searchObject = new CRTMonitor(); Collection results = getApplicationService() .search( "gov.nih.nci.cacoresdk.domain.inheritance.twolevelinheritance.CRTMonitor", searchObject); assertNotNull(results); assertEquals(1, results.size()); for (Iterator i = results.iterator(); i.hasNext(); ) { CRTMonitor result = (CRTMonitor) i.next(); toXML(result); validateClassElements(result); validateAttribute(result, "id", result.getId()); validateAttribute(result, "height", result.getHeight()); validateAttribute(result, "width", result.getWidth()); validateAttribute(result, "brand", result.getBrand()); validateAttribute(result, "refreshRate", result.getRefreshRate()); assertTrue(validateXMLData(result, searchObject.getClass())); CRTMonitor result2 = (CRTMonitor) fromXML(result); assertNotNull(result2); assertNotNull(result2.getId()); assertNotNull(result2.getHeight()); assertNotNull(result2.getWidth()); assertNotNull(result2.getBrand()); assertNotNull(result2.getRefreshRate()); } }