@Test public void testMarcAsMods() throws Exception { XMLUnit.setNormalizeWhitespace(true); InputStream goldenIS = TransformersTest.class.getResourceAsStream("alephXServerDetailResponseAsMods.xml"); assertNotNull(goldenIS); InputStream xmlIS = TransformersTest.class.getResourceAsStream("alephXServerDetailResponseAsMarcXml.xml"); assertNotNull(xmlIS); StreamSource streamSource = new StreamSource(xmlIS); Transformers mt = new Transformers(); try { byte[] contents = mt.transformAsBytes(streamSource, Transformers.Format.MarcxmlAsMods3); assertNotNull(contents); XMLAssert.assertXMLEqual(new InputSource(goldenIS), new InputSource(new ByteArrayInputStream(contents))); } finally { close(xmlIS); close(goldenIS); } }
public byte[] transformAsBytes(Source input, Format format) throws TransformerException { return transformAsBytes(input, format, Collections.<String, Object>emptyMap()); }
Transformers { public byte[] transformAsBytes(Source input, Format format) throws TransformerException { return transformAsBytes(input, format, Collections.<String, Object>emptyMap()); } }
Transformers { public byte[] transformAsBytes(Source input, Format format) throws TransformerException { return transformAsBytes(input, format, Collections.<String, Object>emptyMap()); }  }
Transformers { public byte[] transformAsBytes(Source input, Format format) throws TransformerException { return transformAsBytes(input, format, Collections.<String, Object>emptyMap()); }  Source transform(Source input, Format format); Source transform(Source input, Format format, Map<String, Object> params); byte[] transformAsBytes(Source input, Format format); byte[] transformAsBytes(Source input, Format format, Map<String, Object> params); Source toSource(byte[] buffer); Source dump(Source source, StringBuilder dump); Source dump2Temp(Source source, String filename); }
Transformers { public byte[] transformAsBytes(Source input, Format format) throws TransformerException { return transformAsBytes(input, format, Collections.<String, Object>emptyMap()); }  Source transform(Source input, Format format); Source transform(Source input, Format format, Map<String, Object> params); byte[] transformAsBytes(Source input, Format format); byte[] transformAsBytes(Source input, Format format, Map<String, Object> params); Source toSource(byte[] buffer); Source dump(Source source, StringBuilder dump); Source dump2Temp(Source source, String filename);  }