Xmls { public static Data forData() { return new Data(); }  static Data forData();  }
@Test public void test() { String xmlStr = "<![CDATA[hello]]>"; xmlStr = Xmls.forData().trim().trimCData(xmlStr); Assert.assertEquals("hello", xmlStr); String hello = " hello "; xmlStr = Xmls.forData().trim().trimCData(hello); Assert.assertEquals(" hello ", xmlStr); Assert.assertEquals(null, Xmls.forData().trim().trimCData(null)); }