public void testReadMailingAddress() { try { InputStream inputStream = ClassLoader.getSystemResourceAsStream(XML_RESOURCE_MAILING); MailingAddress testObject = (MailingAddress) unmarshaller.unmarshal(inputStream); } catch (ClassCastException e) { fail(); } }
public void testReadBillingAddress() { try { InputStream inputStream = ClassLoader.getSystemResourceAsStream(XML_RESOURCE_BILLING); Object testObject = unmarshaller.unmarshal(inputStream); fail(); } catch (XMLMarshalException e) { // PASS - an XMLMarshalException should be caught } }