Agreement implements IAgreement, Serializable { @Override public String getName() { return this.name; } 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 writeNameOnly() { final Agreement agreement = new Agreement("name7"); final String xml = createXML(agreement); assertFalse(Utils.isNullOrEmpty(xml)); assertTrue(countElements(xml, "name") == 1); assertEquals(agreement.getName(), findElements(xml, "name").get(0).getTextContent()); assertTrue(countElements(xml, "type") == 0); }