public void testWriteObject_SetOwnerWithWriteStatement() throws Exception {
ByteArrayOutputStream temp = new ByteArrayOutputStream();
XMLEncoder enc = new XMLEncoder(temp);
MockBean4Owner_Target t = new MockBean4Owner_Target();
MockBean4Owner_Owner o = new MockBean4Owner_Owner();
t.setV(o);
enc.setOwner(o);
enc.writeStatement(new Statement(o, "loading", new Object[] {}));
assertCodedXML(t, "/xml/MockBean4Owner_SetOwnerWithWriteStatement.xml",