Address implements Cloneable { @Override public Address clone() { Address clone = new Address(); clone.addressNode = addressNode.clone(); return clone; } Address();  Address(String... addressParts); static Address root(); static Address parse(String addressStr); static Address fromModelNode(ModelNode node); static Address fromModelNodeWrapper(ModelNode haystack, String needle); ModelNode getAddressNode(); Address add(String... addressParts); Address add(String type, String name); Address add(Address address); boolean isRoot(); String[] toAddressParts(); String toAddressPathString(); @Override Address clone(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testClone() throws CloneNotSupportedException { Address addr = Address.root().add("one", "two", "three", "four", "five", "six"); Address addr2 = addr.clone(); assert addr2 != null; assert addr2 != addr; assert addr2.equals(addr); assert addr2.hashCode() == addr.hashCode(); }