/**
   * Uses Nested Search Criteria for inheritance as association in 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 testAssociationNestedSearch4() throws Exception {
    LCDMonitor searchObject = new LCDMonitor();
    searchObject.setBrand("C");
    Collection results =
        getApplicationService()
            .search(
                "gov.nih.nci.cacoresdk.domain.inheritance.twolevelinheritance.Monitor",
                searchObject);

    assertNotNull(results);
    assertEquals(1, results.size());

    for (Iterator i = results.iterator(); i.hasNext(); ) {
      Monitor result = (Monitor) i.next();
      toXML(result);
      Monitor result2 = (Monitor) fromXML(result);

      assertNotNull(result2);
      assertNotNull(result2.getId());
      assertNotNull(result2.getHeight());
      assertNotNull(result2.getWidth());
      assertNotNull(result2.getBrand());
    }
  }
  /**
   * 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 testEntireObjectNestedSearch4() throws Exception {
    LCDMonitor searchObject = new LCDMonitor();
    Collection results =
        getApplicationService()
            .search(
                "gov.nih.nci.cacoresdk.domain.inheritance.twolevelinheritance.LCDMonitor",
                searchObject);

    assertNotNull(results);
    assertEquals(2, results.size());

    for (Iterator i = results.iterator(); i.hasNext(); ) {
      LCDMonitor result = (LCDMonitor) 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, "dpiSupported", result.getDpiSupported());

      assertTrue(validateXMLData(result, searchObject.getClass()));

      LCDMonitor result2 = (LCDMonitor) fromXML(result);

      assertNotNull(result2);
      assertNotNull(result2.getId());
      assertNotNull(result2.getHeight());
      assertNotNull(result2.getWidth());
      assertNotNull(result2.getBrand());
      assertNotNull(result2.getDpiSupported());
    }
  }