public void testContainerReused() throws Exception { URL url = ClassLoader.getSystemResource(resourceName); Employee testObject = (Employee) xmlUnmarshaller.unmarshal(url); assertEquals( "This mapping's container was not reused.", Stack.class, testObject.getEmailAddresses().getClass()); }
public Object getControlObject() { Employee emp = new Employee(); emp.setID(123); EmailAddress email1 = new EmailAddress(); email1.setUserID("jondoe"); email1.setDomain("test.com"); EmailAddress email2 = new EmailAddress(); email2.setUserID("elfkillah1984"); email2.setDomain("everquest.com"); Vector emails = new Stack(); emails.add(email1); emails.add(email2); emp.setEmailAddresses(emails); return emp; }