NsesssUtils { public static String toXml(Object object, boolean indent) { StringWriter dump = new StringWriter(); marshal(new StreamResult(dump), object, indent); return dump.toString(); }  static JAXBContext defaultJaxbContext(); static Marshaller defaultMarshaller(boolean indent); static Unmarshaller defaultUnmarshaller(); static String toXml(Object object, boolean indent); static void marshal(Result target, Object object, boolean indent); static T unmarshal(String source, Class<T> type); static T unmarshal(URL source, Class<T> type); static T unmarshal(Source source, Class<T> type); static Spis defaultSpis(); static Dokument defaultInternalDokument(); static Dokument defaultExternalDocument();  }
@Test public void testSpisToXml() { Spis object = new Spis(); String result = NsesssUtils.toXml(object, true); System.out.println(result); assertNotNull(result); }