@Test
public void testChangeComments() {
final Element root = new Element(NAME);
root.addComment("hello", false);
root.addComment("HELLO", false);
root.changeComments(String::toUpperCase);
assertEquals(2, root.getChildrenCount());
assertEquals("HELLO", root.getChildAt(Comment.class, 0).getContent());
assertEquals("HELLO", root.getChildAt(Comment.class, 1).getContent());
root.removeChildren();
final Element child1 = root.addElement(NAME1);
final Element child2 = root.addElement(NAME2);
final Element child3 = root.addElement(NAME1);
child1.addComment("hello");
child2.addComment("hello");
child3.addComment("hel");
child3.addComment("lo", false);
assertEquals(2, child3.getChildrenCount());
root.changeComments(String::toUpperCase, true);
assertEquals(2, child3.getChildrenCount());
assertEquals("HELLO", child1.getChild(Comment.class).getContent());
assertEquals("HEL", child3.getChildAt(Comment.class, 0).getContent());
}