### Question:
Rope { public Rope concat(Rope anotherRope) { if (anotherRope == null) { throw new IllegalArgumentException("Attempting to concat this rope with null"); } Node newRoot = new Node(this.root.getNodeBody()); return Rope.fromNode(newRoot.concat(anotherRope.root)); } private  Rope(Node root, int start, int length); static Rope from(String s); int length(); Rope slice(int start, int end); Rope replace(int start, int end, String newString); Rope concat(Rope anotherRope); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testConcat() { Rope a = Rope.from("hello"); Rope b = Rope.from(" world"); Rope c = a.concat(b); assertEquals(c.toString(), "hello world"); assertEquals(a.toString(), "hello"); assertEquals(b.toString(), " world"); Rope license = Rope.from(text); Rope newLicense = license.concat(Rope.from("=>> MIT LICENSE")); assertEquals(license.toString(), text); assertEquals(newLicense.toString(), text + "=>> MIT LICENSE"); assertNotEquals(license, newLicense); }