### Question:
Node implements Cloneable { public Node before(String html) { addSiblingHtml(siblingIndex, html); return this; } protected  Node(); abstract String nodeName(); boolean hasParent(); String attr(String attributeKey); String getAttr(String attributeKey, String defaultValue); abstract Attributes attributes(); Node attr(String attributeKey, String attributeValue); @Deprecated void addAttr(String attributeKey, String attributeValue, String separator); boolean hasAttr(String attributeKey); Node removeAttr(String attributeKey); Node clearAttributes(); @NotNull Node getOwnerDocumentNode(); @NotNull Node getOwnerBody(); String getImmutableText(); void setImmutableText(String immutableText); @NotNull RealVector getFeatures(); void setFeatures(@NotNull RealVector features); @NotNull Map<String, Object> getVariables(); @NotNull Map<String, List<Object>> getTuples(); int siblingSize(); abstract String baseUri(); void setBaseUri(final String baseUri); String absUrl(String attributeKey); Node childNode(int index); List<Node> childNodes(); List<Node> childNodesCopy(); abstract int childNodeSize(); Node parent(); final Node parentNode(); Node root(); Document ownerDocument(); void remove(); Node before(String html); Node before(Node node); Node after(String html); Node after(Node node); Node wrap(String html); Node unwrap(); void replaceWith(Node in); List<Node> siblingNodes(); Node nextSibling(); Node previousSibling(); int siblingIndex(); Node traverse(NodeVisitor nodeVisitor); Node filter(NodeFilter nodeFilter); String outerHtml(); T html(T appendable); String toString(); @Override boolean equals(Object o); boolean hasSameValue(Object o); @Override Node clone(); Node shallowClone(); static final String EmptyString; static final RealVector EMPTY_FEATURE; }### Answer:
@Test public void before() { Document doc = Jsoup.parse("<p>One <b>two</b> three</p>"); Element newNode = new Element(Tag.valueOf("em"), ""); newNode.appendText("four"); doc.select("b").first().before(newNode); assertEquals("<p>One <em>four</em><b>two</b> three</p>", doc.body().html()); doc.select("b").first().before("<i>five</i>"); assertEquals("<p>One <em>four</em><i>five</i><b>two</b> three</p>", doc.body().html()); }