### Question:
XmlbeansToJson { public synchronized static JSONArray convert(String serviceXML) throws XmlException, JSONException { ServiceT service = ServiceT.Factory.parse(serviceXML); return convert(service); }  synchronized static JSONArray convert(String serviceXML); synchronized static JSONArray convert(final ServiceT service);  }### Answer:
@Test public void test() throws JSONException { System.out.println(XmlbeansToJson.convert(service).toString(2)); assertTrue(XmlbeansToJson.convert(service).length() > 0); }
@Test public void testString() throws JSONException, XmlException { assertNotNull(XmlbeansToJson.convert(service.toString())); }