### Question:
NodeTypeNode extends JsonNode { public Map<String, javax.jcr.nodetype.NodeType> getNodeTypes( String jsonResponse ) throws Exception { CheckArg.isNotNull(jsonResponse, "jsonResponse"); Map<String, NodeType> nodeTypesByName = new HashMap<String, NodeType>(); JSONObject body = new JSONObject(jsonResponse); if (body.has("children")) { Object obj = body.get("children"); JSONObject children = (JSONObject)obj; for (Iterator<?> itr = children.keys(); itr.hasNext();) { String key = JsonUtils.decode(itr.next().toString()); Object child = children.get(key); if (child != null) { createNodeType(key, (JSONObject)child, nodeTypesByName); } } } Map<String, javax.jcr.nodetype.NodeType> result = new HashMap<String, javax.jcr.nodetype.NodeType>(); for (NodeType nodeType : nodeTypesByName.values()) { result.put(nodeType.getName(), nodeType); } nodeTypeMap = result; return nodeTypeMap; } NodeTypeNode( Workspace workspace );  NodeTypeNode( Workspace workspace,
                         String nodeTypeName ); String getPath(); @Override URL getUrl(); Map<String, javax.jcr.nodetype.NodeType> getNodeTypes( String jsonResponse );  }### Answer:
@Test public void shouldParseJSONResponseContainingNodeTypes() throws Exception { String response = IoUtil.read(new File("src/test/resources/jcr_nodeTypes.txt")); Map<String, NodeType> nodeTypes = factory.getNodeTypes(response); printNodeTypes(nodeTypes); }