String testInput = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>test page</title></head><body>Hello, world! ß</body></html>";
try {
Resource resource = new Resource(null, testInput.getBytes(Constants.CHARACTER_ENCODING), "test.html", MediatypeService.XHTML, Constants.CHARACTER_ENCODING);
book.getResources().add(resource);
HtmlCleanerBookProcessor htmlCleanerBookProcessor = new HtmlCleanerBookProcessor();
byte[] processedHtml = htmlCleanerBookProcessor.processHtml(resource, book, Constants.CHARACTER_ENCODING);
String result = new String(processedHtml, Constants.CHARACTER_ENCODING);
assertEquals(Constants.DOCTYPE_XHTML + "\n" + testInput, result);
} catch (IOException e) {
assertTrue(e.getMessage(), false);
}