### Question:
JAXBLength implements JAXBWrapper<Length> { @Override public Length getWrappedObject() { return Length.create(myUnits, myMagnitude); } JAXBLength(Length length); protected  JAXBLength(); @Override boolean equals(Object obj); @Override Length getWrappedObject(); @Override int hashCode();  }### Answer:
@Test public void test() throws JAXBException, ClassNotFoundException { Length result; Element el; Length testMeters = new Meters(3324.352); ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLUtilities.writeXMLObject(new JAXBLength(testMeters), baos); result = XMLUtilities.readXMLObject(new ByteArrayInputStream(baos.toByteArray()), JAXBLength.class).getWrappedObject(); Assert.assertEquals(result, testMeters); baos.reset(); el = XMLUtilities.marshalJAXBableToElement(testMeters); result = XMLUtilities.readJAXBableObject(el, Length.class); Assert.assertEquals(result, testMeters); Length testFeet = new Feet(3324.352); baos.reset(); XMLUtilities.writeXMLObject(new JAXBLength(testFeet), baos); result = XMLUtilities.readXMLObject(new ByteArrayInputStream(baos.toByteArray()), JAXBLength.class).getWrappedObject(); Assert.assertEquals(result, testFeet); baos.reset(); el = XMLUtilities.marshalJAXBableToElement(testFeet); result = XMLUtilities.readJAXBableObject(el, Length.class); Assert.assertEquals(result, testFeet); }