@Test public void testRemoveChildren() { final Element container = mock(Element.class); final Element child = mock(Element.class); container.firstChild = child; when(container.removeChild(child)).then(a -> { container.firstChild = null; return child; }); RemoveHelper.removeChildren(container); verify(container).removeChild(child); }
public static void removeChildren(final Element element) { while (element.firstChild != null) { element.removeChild(element.firstChild); } }
RemoveHelper { public static void removeChildren(final Element element) { while (element.firstChild != null) { element.removeChild(element.firstChild); } } }
RemoveHelper { public static void removeChildren(final Element element) { while (element.firstChild != null) { element.removeChild(element.firstChild); } }  }
RemoveHelper { public static void removeChildren(final Element element) { while (element.firstChild != null) { element.removeChild(element.firstChild); } }  static void removeChildren(final Element element); }
RemoveHelper { public static void removeChildren(final Element element) { while (element.firstChild != null) { element.removeChild(element.firstChild); } }  static void removeChildren(final Element element);  }