assertTrue(e.getMessage(), false);
}
}
public void testDocType2() {
Book book = new Book();
String testInput = Constants.DOCTYPE_XHTML + "\n<html><head><title>title</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/></head><body>Hello, world!</html>";
String expectedResult = Constants.DOCTYPE_XHTML + "\n<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>title</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=" + Constants.CHARACTER_ENCODING + "\" /></head><body>Hello, world!</body></html>";
try {
Resource resource = new Resource(testInput.getBytes(Constants.CHARACTER_ENCODING), "test.html");
book.getResources().add(resource);
HtmlCleanerBookProcessor htmlCleanerBookProcessor = new HtmlCleanerBookProcessor();
byte[] processedHtml = htmlCleanerBookProcessor.processHtml(resource, book, Constants.CHARACTER_ENCODING);
String actualResult = new String(processedHtml, Constants.CHARACTER_ENCODING);
assertEquals(expectedResult, actualResult);
} catch (IOException e) {