Agreement implements IAgreement, Serializable { public void setType(final String type) { this.type = type; } Agreement();  Agreement(final String name);  Agreement(final String name, final String type);  Agreement(IAgreement source); @Override String getName(); @Override String getType(); void setName(final String name); void setType(final String type);  }
@Test public void testWriteNoName() { final Agreement agreement = new Agreement(); final String xml = createXML(agreement); assertTrue(Utils.isNullOrEmpty(xml)); final Agreement agreement2 = new Agreement(); agreement2.setType("illegal"); final String xml2 = createXML(agreement2); assertTrue(Utils.isNullOrEmpty(xml2)); }