### Question:
JSNode implements Map<String, Object> { public JSArray diff(JSNode source) { ObjectMapper mapper = new ObjectMapper(); JsonNode patch; try { patch = JsonDiff.asJson(mapper.readValue(source.toString(), JsonNode.class), mapper.readValue(this.toString(), JsonNode.class)); JSArray patchesArray = JSNode.parseJsonArray(patch.toPrettyString()); return patchesArray; } catch (Exception e) { e.printStackTrace(); Utils.rethrow(e); } return null; } JSNode();  JSNode(Object... nameValuePairs);  JSNode(Map nameValuePairs); static Object parseJson(String json); static JSNode parseJsonNode(String json); static JSArray parseJsonArray(String json); JSArray findAll(String pathExpression, int qty); JSArray diff(JSNode source); void patch(JSArray patches); @Override Object get(Object name); JSNode getNode(String name); JSArray getArray(String name); String getString(String name); int getInt(String name); double getDouble(String name); boolean getBoolean(String name); JSNode findNode(String pathExpression); JSArray findArray(String pathExpression); String findString(String pathExpression); int findInt(String pathExpression); double findDouble(String pathExpression); boolean findBoolean(String pathExpression); Object find(String pathExpression); JSArray findAll(String pathExpression); List<JSNode> findAllNodes(String pathExpression); @Override Object put(String name, Object value); @Override void putAll(Map<? extends String, ? extends Object> map); Object putFirst(String name, Object value); JSNode with(Object... nvPairs); @Override boolean containsKey(Object name); @Override Object remove(Object name); Object remove(String... names); @Override Set<String> keySet(); boolean hasProperty(String name); Map<? extends String, ? extends Object> asMap(); JSNode copy(); void sortKeys(); boolean isArray(); @Override String toString(); String toString(boolean pretty); String toString(boolean pretty, boolean lowercasePropertyNames); @Override int size(); @Override boolean isEmpty(); @Override boolean containsValue(Object value); @Override void clear(); @Override Collection values(); @Override Set<Entry<String, Object>> entrySet(); List asList(); List<JSNode> asNodeList(); JSArray asArray(); Stream stream();  }### Answer:
@Test public void diff_remove_element_from_array() { JSArray arr1 = new JSArray("one", "two", "three"); JSArray arr2 = new JSArray("one", "two", "three", "four"); JSArray patches = arr1.diff(arr2); }