@Test void testConvert() { DocumentFactory df = DocumentFactory.getInstance(); Document doc = df.createDocument("UTF-8"); doc.setRootElement(df.createElement("rootElement")); byte[] actual = testSubject.convert(doc); assertNotNull(actual); String actualString = new String(actual); assertTrue(actualString.contains("rootElement"), "Wrong output: " + actualString); }
@Override public byte[] convert(Document original) { return original.asXML().getBytes(IOUtils.UTF8); }
Dom4JToByteArrayConverter implements ContentTypeConverter<Document,byte[]> { @Override public byte[] convert(Document original) { return original.asXML().getBytes(IOUtils.UTF8); } }
Dom4JToByteArrayConverter implements ContentTypeConverter<Document,byte[]> { @Override public byte[] convert(Document original) { return original.asXML().getBytes(IOUtils.UTF8); }  }
Dom4JToByteArrayConverter implements ContentTypeConverter<Document,byte[]> { @Override public byte[] convert(Document original) { return original.asXML().getBytes(IOUtils.UTF8); }  @Override Class<Document> expectedSourceType(); @Override Class<byte[]> targetType(); @Override byte[] convert(Document original); }
Dom4JToByteArrayConverter implements ContentTypeConverter<Document,byte[]> { @Override public byte[] convert(Document original) { return original.asXML().getBytes(IOUtils.UTF8); }  @Override Class<Document> expectedSourceType(); @Override Class<byte[]> targetType(); @Override byte[] convert(Document original);  }