public static void copyObject(Inspector from, Cursor to) {
        if (from.type() != Type.OBJECT) {
            throw new IllegalArgumentException("Cannot copy object: " + from);
        }
        from.traverse((ObjectTraverser) (name, inspector) -> setObjectEntry(inspector, name, to));

    }
@Test
    public void test_copying_slime_arrays_into_cursor() {
        Slime slime = new Slime();
        Cursor root = slime.setObject();
        root.setString("foo", "foobie");
        Cursor subobj = root.setObject("bar");

        Slime slime2 = new Slime();
        Cursor root2 = slime2.setObject();
        Cursor array = root2.setArray("a");
        array.addString("foo");
        array.addLong(4);
        array.addBool(true);
        array.addDouble(3.14);
        array.addNix();
        array.addData(new byte[]{0x64});
        Cursor objinner = array.addObject();
        objinner.setString("inner", "binner");

        SlimeUtils.copyObject(slime2.get(), subobj);

        assertEquals("{\"foo\":\"foobie\",\"bar\":{\"a\":[\"foo\",4,true,3.14,null,\"0x64\",{\"inner\":\"binner\"}]}}",
                     root.toString());
    }