public void tearDown() {
   super.tearDown();
   jaxbContext = null;
   jaxbMarshaller = null;
   jaxbUnmarshaller = null;
   classLoader = null;
   bindingsFileXSDSource = null;
 }
 public void setUp() {
   try {
     super.setUp();
     InputStream inputStream = ClassLoader.getSystemResourceAsStream(XML_COMPARISON_RESOURCE);
     DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
     builderFactory.setIgnoringElementContentWhitespace(true);
     DocumentBuilder parser = builderFactory.newDocumentBuilder();
     comparisonControlDocument = parser.parse(inputStream);
     removeEmptyTextNodes(comparisonControlDocument);
   } catch (Exception e) {
     e.printStackTrace();
     this.fail("An exception occurred during setup");
   }
 }
  public void xmlToObjectTest(Object testObject, Object controlObject) throws Exception {
    log("\n**xmlToObjectTest**");
    log("Expected:");
    log(controlObject.toString());
    log("Actual:");
    log(testObject.toString());

    if ((controlObject instanceof JAXBElement) && (testObject instanceof JAXBElement)) {
      JAXBElement controlObj = (JAXBElement) controlObject;
      JAXBElement testObj = (JAXBElement) testObject;
      compareJAXBElementObjects(controlObj, testObj);
    } else {
      super.xmlToObjectTest(testObject);
    }
  }
 public void xmlToObjectTest(Object testObject) throws Exception {
   Employee testEmployee = (Employee) testObject;
   assertEquals(1, testEmployee.getSettings().size());
   super.xmlToObjectTest(testObject);
 }