### Question:
MergeableTagConverter extends XmlAdapter<String, MergeableTags> { @Override public String marshal(MergeableTags mergeableTags) throws Exception { if (mergeableTags == null) { return null; } if (mergeableTags.getTags().isEmpty()) { return null; } StringBuilder builder = new StringBuilder(); boolean first = true; for (String s : mergeableTags.getTags()) { if (first) { first = false; } else { builder.append(SPLIT); } builder.append(s); } return builder.toString(); }  @Override String marshal(MergeableTags mergeableTags); @Override MergeableTags unmarshal(String input);  }### Answer:
@Test public void testToString() throws Exception { MergeableTags mergeable = new MergeableTags(TAGS); String converted = converter.marshal(mergeable); assertEquals(CONVERTED_TAGS, converted); }
@Test public void testEmptyInput() throws Exception { MergeableTags mergeable = new MergeableTags(); assertNull(converter.marshal(mergeable)); }
@Test public void testNullInput() throws Exception { assertNull(converter.marshal(null)); }