### Question:
FieldNameAdapter extends XmlAdapter<String, FieldName> { @Override public String marshal(FieldName value){ if(value == null){ return null; } return value.getValue(); }  @Override FieldName unmarshal(String value); @Override String marshal(FieldName value);  }### Answer:
@Test public void marshal(){ FieldNameAdapter adapter = new FieldNameAdapter(); assertEquals(null, adapter.marshal(null)); assertEquals("x", adapter.marshal(FieldName.create("x"))); }