### Question:
JsonUtil { public static ObjectNode objectNodeFromString(final String jsonData) { return objectNodeFromString(jsonData, false); }  static ObjectNode normalizeKeys(final ObjectNode objectNode); static Optional<String> getValueAsString(final ObjectNode node, final String key); static String getValueAsString(
      final ObjectNode node, final String key, final String defaultValue); static Optional<String> getString(final ObjectNode node, final String key); static String getString(
      final ObjectNode node, final String key, final String defaultValue); static OptionalInt getInt(final ObjectNode node, final String key); static int getInt(final ObjectNode node, final String key, final int defaultValue); static OptionalLong getLong(final ObjectNode json, final String key); static long getLong(final ObjectNode json, final String key, final long defaultValue); static Optional<Boolean> getBoolean(final ObjectNode node, final String key); static boolean getBoolean(
      final ObjectNode node, final String key, final boolean defaultValue); static ObjectNode createEmptyObjectNode(); static ObjectNode objectNodeFromMap(final Map<String, Object> map); static ObjectNode objectNodeFromString(final String jsonData); static ObjectNode objectNodeFromString(
      final String jsonData, final boolean allowComments); static String getJson(final Object objectNode); static String getJson(final Object objectNode, final boolean prettyPrint); static ObjectMapper getObjectMapper(); static Optional<ObjectNode> getObjectNode(final ObjectNode json, final String fieldKey); static Optional<ObjectNode> getObjectNode(
      final ObjectNode json, final String fieldKey, final boolean strict); static Optional<ArrayNode> getArrayNode(final ObjectNode json, final String fieldKey); static Optional<ArrayNode> getArrayNode(
      final ObjectNode json, final String fieldKey, final boolean strict);  }### Answer:
@Test public void objectNodeFromString() { final String jsonStr = "{\"a\":1, \"b\":2}"; final ObjectNode result = JsonUtil.objectNodeFromString(jsonStr); assertThat(result.get("a").asInt()).isEqualTo(1); assertThat(result.get("b").asInt()).isEqualTo(2); }
@Test public void objectNodeFromString_withComments_commentsDisabled() { final String jsonStr = " assertThatThrownBy(() -> JsonUtil.objectNodeFromString(jsonStr, false)) .hasCauseInstanceOf(JsonParseException.class) .hasMessageContaining("Unexpected character ('/'"); }
@Test public void objectNodeFromString_withComments_commentsEnabled() { final String jsonStr = " final ObjectNode result = JsonUtil.objectNodeFromString(jsonStr, true); assertThat(result.get("a").asInt()).isEqualTo(1); assertThat(result.get("b").asInt()).isEqualTo(2); }