// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static Reader toReader(String string) {
//     return new JsonStringReader(string);
// }


import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import static java.math.BigDecimal.ONE;
import static java.math.BigDecimal.valueOf;
import static java.util.Arrays.asList;
import static net.javacrumbs.jsonunit.core.internal.Utils.toReader;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
        assertEquals(Node.NodeType.OBJECT, node.getNodeType());

        Node root = node.get("root");
        assertEquals(Node.NodeType.OBJECT, root.getNodeType());

        Node a = root.get("a");
        assertEquals(Node.NodeType.NUMBER, a.getNodeType());
        assertEquals(ONE, a.decimalValue());

        Node b = root.get("b");
        assertEquals(Node.NodeType.NULL, b.getNodeType());
        assertEquals(true, b.isNull());
    }

    @Test
    public void shouldConvertArray() {
        Node node = factory.convertValue(new int[]{1, 2});
        assertEquals(Node.NodeType.ARRAY, node.getNodeType());
        assertEquals(ONE, node.element(0).decimalValue());
    }

    @Test
    public void shouldConvertCollection() {
        Node node = factory.convertValue(asList(false, "two"));
        assertEquals(Node.NodeType.ARRAY, node.getNodeType());
        assertEquals(false, node.element(0).asBoolean());
        assertEquals("two", node.element(1).asText());
    }

    private Node read(String value) {
// Path: json-unit-core/src/main/java/net/javacrumbs/jsonunit/core/internal/Utils.java
// static Reader toReader(String string) {
//     return new JsonStringReader(string);
// }


// Path: json-unit-core/src/test/java/net/javacrumbs/jsonunit/core/internal/NodeFactoryTest.java
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import static java.math.BigDecimal.ONE;
import static java.math.BigDecimal.valueOf;
import static java.util.Arrays.asList;
import static net.javacrumbs.jsonunit.core.internal.Utils.toReader;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

        assertEquals(Node.NodeType.OBJECT, node.getNodeType());

        Node root = node.get("root");
        assertEquals(Node.NodeType.OBJECT, root.getNodeType());

        Node a = root.get("a");
        assertEquals(Node.NodeType.NUMBER, a.getNodeType());
        assertEquals(ONE, a.decimalValue());

        Node b = root.get("b");
        assertEquals(Node.NodeType.NULL, b.getNodeType());
        assertEquals(true, b.isNull());
    }

    @Test
    public void shouldConvertArray() {
        Node node = factory.convertValue(new int[]{1, 2});
        assertEquals(Node.NodeType.ARRAY, node.getNodeType());
        assertEquals(ONE, node.element(0).decimalValue());
    }

    @Test
    public void shouldConvertCollection() {
        Node node = factory.convertValue(asList(false, "two"));
        assertEquals(Node.NodeType.ARRAY, node.getNodeType());
        assertEquals(false, node.element(0).asBoolean());
        assertEquals("two", node.element(1).asText());
    }

    private Node read(String value) {
        return factory.readValue(toReader(value), "label", false);