### Question:
LogUtil { public static boolean needsCDATA(String s) { return xmlReservedPattern.matcher(s).find(); }  static void dump(PrintStream p, String indent, String s); static boolean needsCDATA(String s); static final Pattern xmlReservedPattern; }### Answer:
@Test public void testNeedsCDATAjson() { String json = "{\"amount\": 123}"; assertFalse(LogUtil.needsCDATA(json)); }
@Test public void testNeedsCDATAxml() { String xml = "<tag>hello</tag>"; assertTrue(LogUtil.needsCDATA(xml)); }
@Test public void testNeedsCDATAapos() { String apostrophe = "Rock'n roll"; assertFalse(LogUtil.needsCDATA(apostrophe)); }
@Test public void testNeedsCDATAamp() { String amp = "This & that"; assertTrue(LogUtil.needsCDATA(amp)); }
@Test public void testNeedsCDATA() { String normal = "The quick brown fox jumps over the lazy dog"; assertFalse(LogUtil.needsCDATA(normal)); }