### Question:
JDOMExternUtil { public static String writeToString(Object data) throws Exception { return writeToString("root", data); } private  JDOMExternUtil(); static void writeTo(Element root, Object obj); static Object readFrom(Element root); static void readTo(Element root, Object obj); static String writeToString(Object data); static String writeToString(String rootName, Object data); static Object readFromString(String str);  }### Answer:
@Test public void testWriteColorPair() throws Exception { assertThat( JDOMExternUtil.writeToString("highlight", (Pair) null), containsString(HIGHLIGHT_NULL)); assertThat( JDOMExternUtil.writeToString("highlight", Pair.of(null, null)), containsString(HIGHLIGHT_CLASS_NULL)); assertThat( JDOMExternUtil.writeToString("highlight", Pair.of(null, Color.RED)), containsString(HIGHLIGHT_CLASS_NULL)); assertThat( JDOMExternUtil.writeToString("highlight", Pair.of(Color.CYAN, null)), containsString(HIGHLIGHT_CLASS_CYAN)); assertThat( JDOMExternUtil.writeToString("highlight", Pair.of(Color.CYAN, Color.RED)), containsString(HIGHLIGHT_CLASS_CYAN_RED)); }