### Question:
JSONUtils { public void put(JsonNode jsonNode, String path, JsonNode value) { JsonPointer valueNodePointer = JsonPointer.compile(asJsonPath(path)); JsonPointer parentPointer = valueNodePointer.head(); addMissingNodeIfNecessary(jsonNode, path); JsonNode parentNode = jsonNode.at(parentPointer); if (parentNode.getNodeType() == JsonNodeType.OBJECT) { ObjectNode parentNodeToUpdate = (ObjectNode) parentNode; parentNodeToUpdate.set(StringUtils.replace(valueNodePointer.last().toString(),"/", ""), value); } } private  JSONUtils(); static JSONUtils getInstance(); JsonNode parse(String raw); JsonNode parseWithError(String raw); ObjectNode parseObj(String raw); String asJsonString(T object); T parse(byte[] raw, Class<T> destClass); T parse(String raw, Class<T> destClass); JsonNode toJsonNode(Object obj); String asJsonPath(String path); boolean has(JsonNode jsonNode, String path); JsonNode at(JsonNode jsonNode, String path); void put(JsonNode jsonNode, String path, JsonNode value); void remove(JsonNode jsonNode, String path);  }### Answer:
@Test public void put() { String input = "{ \"name\":\"John\", \"age\":30}"; JsonNode parse = jsonUtils.parse(input); jsonUtils.put(parse, "car.type", JsonNodeFactory.instance.textNode("test")); Assertions.assertThat(parse.at("/car").getNodeType()).isEqualTo(JsonNodeType.OBJECT); Assertions.assertThat(parse.at("/car/type").asText()).isEqualTo("test"); }