@Test
void replaceWithChildren()
{

    Document document =
        this.cleaner.clean(new StringReader("<html><head><body><div><p>test1</p><p>test2</p></div></body></html>"));
    List<Element> div = htmlFilter.filterDescendants(document.getDocumentElement(), new String[]{ "div" });
    assertEquals(1, div.size());
    htmlFilter.replaceWithChildren(div.get(0));
    div = htmlFilter.filterDescendants(document.getDocumentElement(), new String[]{ "div" });
    assertTrue(div.isEmpty());
    List<Element> paragraphs = htmlFilter.filterDescendants(document.getDocumentElement(), new String[]{ "p" });
    assertEquals(2, paragraphs.size());
}