### Question:
JSNode implements Map<String, Object> { public JSNode with(Object... nvPairs) { if (nvPairs == null || nvPairs.length == 0) return this; if (nvPairs.length % 2 != 0) throw new RuntimeException("You must supply an even number of arguments to JSNode.with()"); for (int i = 0; i < nvPairs.length - 1; i += 2) { Object value = nvPairs[i + 1]; if (value instanceof Map && !(value instanceof JSNode)) throw new RuntimeException("Invalid map value"); if (value instanceof List && !(value instanceof JSArray)) throw new RuntimeException("Invalid list value"); put(nvPairs[i] + "", value); } return this; } 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 testWith() { JSArray arr = new JSArray(1, 2, 3, 4); JSNode node = new JSNode().with("name", "value", "name2", "value2", "arr", arr); assertEquals("value", node.find("name")); assertEquals("value2", node.find("name2")); assertEquals(arr, node.find("arr")); }