ProductionWriter { String asXML() throws ProductionException { return mergeTemplate(XML_TEMPLATE); } ProductionWriter(Production production);  ProductionWriter(Production production, String[] imgUrls); void write(File stagingDir); void writeAsXML(File stagingDir); void writeAsHTML(File stagingDir);  }
@Test public void testAsXml() throws Exception { String xml = productionWriter.asXML(); assertNotNull(xml); xml = xml.replace(System.lineSeparator(), "\n"); assertEquals(320, xml.length()); assertTrue(xml.contains("<id>9A3F</id>")); assertTrue(xml.contains("<name>Toasting</name>")); }