// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static Node convertToJson(Object source, String label) {
//     return convertToJson(source, label, false);
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static Node getNode(Object root, String path) {
//     return getNode(root, Path.create(path));
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static boolean nodeAbsent(Object json, String path, Configuration configuration) {
//     return nodeAbsent(json, Path.create(path), configuration);
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// @Deprecated
// public static boolean nodeExists(Object json, String path) {
//     return !getNode(json, path).isMissingNode();
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// static String quoteIfNeeded(String source) {
//     String trimmed = source.trim();
// 
//     if (isObject(trimmed) || isArray(trimmed) || isString(trimmed)
//         || isBoolean(trimmed) || isNull(trimmed)
//         || isNumber(trimmed)) {
//         return source;
//     } else {
//         return "\"" + source + "\"";
//     }
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static Node valueToNode(Object source) {
//     if (source instanceof Node) {
//         return (Node) source;
//     } else {
//         return converter.valueToNode(source);
//     }
// }


import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.math.BigDecimal;
import static java.util.Collections.singletonMap;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.convertToJson;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.getNode;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.nodeAbsent;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.nodeExists;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.quoteIfNeeded;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.valueToNode;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.ARRAY;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.BOOLEAN;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.NULL;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.NUMBER;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.OBJECT;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.STRING;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
/**
 * Copyright 2009-2019 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.javacrumbs.jsonunit.core.internal;




class JsonUtilsTest {

    private static final ObjectMapper mapper = new ObjectMapper();

    @Test
    void testConvertToJson() {
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static Node convertToJson(Object source, String label) {
//     return convertToJson(source, label, false);
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static Node getNode(Object root, String path) {
//     return getNode(root, Path.create(path));
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static boolean nodeAbsent(Object json, String path, Configuration configuration) {
//     return nodeAbsent(json, Path.create(path), configuration);
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// @Deprecated
// public static boolean nodeExists(Object json, String path) {
//     return !getNode(json, path).isMissingNode();
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// static String quoteIfNeeded(String source) {
//     String trimmed = source.trim();
// 
//     if (isObject(trimmed) || isArray(trimmed) || isString(trimmed)
//         || isBoolean(trimmed) || isNull(trimmed)
//         || isNumber(trimmed)) {
//         return source;
//     } else {
//         return "\"" + source + "\"";
//     }
// }
// 
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/JsonUtils.java
// public static Node valueToNode(Object source) {
//     if (source instanceof Node) {
//         return (Node) source;
//     } else {
//         return converter.valueToNode(source);
//     }
// }


// Path: json-unit-core/src/test/java/net/javacrumbs/jsonunit/core/internal/JsonUtilsTest.java
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.math.BigDecimal;
import static java.util.Collections.singletonMap;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.convertToJson;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.getNode;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.nodeAbsent;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.nodeExists;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.quoteIfNeeded;
import static net.javacrumbs.jsonunit.core.internal.JsonUtils.valueToNode;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.ARRAY;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.BOOLEAN;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.NULL;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.NUMBER;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.OBJECT;
import static net.javacrumbs.jsonunit.core.internal.Node.NodeType.STRING;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
 * Copyright 2009-2019 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.javacrumbs.jsonunit.core.internal;




class JsonUtilsTest {

    private static final ObjectMapper mapper = new ObjectMapper();

    @Test
    void testConvertToJson() {
        assertEquals(STRING, convertToJson("\"a\"", "x").getNodeType());