### Question:
PMMLUtils { public static String toString(PMML pmml) { try (StringWriter out = new StringWriter()) { Marshaller marshaller = JAXBUtil.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE); marshaller.marshal(pmml, new StreamResult(out)); return out.toString(); } catch (JAXBException | IOException e) { throw new IllegalStateException(e); } } private  PMMLUtils(); static PMML buildSkeletonPMML(); static void write(PMML pmml, Path path); static void write(PMML pmml, OutputStream out); static PMML read(Path path); static PMML read(InputStream in); static String toString(PMML pmml); static PMML fromString(String pmmlString); static final String VERSION; }### Answer:
@Test public void testToString() throws Exception { PMML model = buildDummyModel(); model.getHeader().setTimestamp(null); assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" + "<PMML version=\"4.3\" xmlns=\"http: "xmlns:data=\"http: "<Header>" + "<Application name=\"Oryx\"/>" + "</Header>" + "<TreeModel functionName=\"classification\">" + "<Node recordCount=\"123.0\"/>" + "</TreeModel>" + "</PMML>", PMMLUtils.toString(model)); }