// Path: src/main/java/com/github/rschmitt/dynamicobject/DynamicObject.java
// static <T> T deserialize(String edn, Class<T> type) {
//     return EdnSerialization.deserialize(edn, type);
// }
// 
// Path: src/main/java/com/github/rschmitt/dynamicobject/DynamicObject.java
// static <D extends DynamicObject<D>> D newInstance(Class<D> type) {
//     return Instances.newInstance(type);
// }
// 
// Path: src/main/java/com/github/rschmitt/dynamicobject/DynamicObject.java
// static String serialize(Object o) {
//     return EdnSerialization.serialize(o);
// }


import static com.github.rschmitt.dynamicobject.DynamicObject.deserialize;
import static com.github.rschmitt.dynamicobject.DynamicObject.newInstance;
import static com.github.rschmitt.dynamicobject.DynamicObject.serialize;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

        Coll actual = newInstance(Coll.class).set(set);

        roundTripTest(expected, Coll.class);
        roundTripTest(actual, Coll.class);
        assertEquals(expected, actual);
        assertEquals(set, expected.set());
        assertEquals(set, actual.set());
        assertEquals(actual.set(), set);
        assertEquals(expected.set(), set);
    }

    @Test
    public void map() {
        Coll expected = deserialize("#Coll{:map {#X{:y 1}, #X{:y 2}}}", Coll.class);
        Map<X, X> map = new HashMap<>();
        map.put(newInstance(X.class).y(1), newInstance(X.class).y(2));

        Coll actual = newInstance(Coll.class).map(map);

        roundTripTest(expected, Coll.class);
        roundTripTest(actual, Coll.class);
        assertEquals(expected, actual);
        assertEquals(map, expected.map());
        assertEquals(map, actual.map());
        assertEquals(actual.map(), map);
        assertEquals(expected.map(), map);
    }

    private <D extends DynamicObject<D>> void roundTripTest(D obj, Class<D> type) {
// Path: src/main/java/com/github/rschmitt/dynamicobject/DynamicObject.java
// static <T> T deserialize(String edn, Class<T> type) {
//     return EdnSerialization.deserialize(edn, type);
// }
// 
// Path: src/main/java/com/github/rschmitt/dynamicobject/DynamicObject.java
// static <D extends DynamicObject<D>> D newInstance(Class<D> type) {
//     return Instances.newInstance(type);
// }
// 
// Path: src/main/java/com/github/rschmitt/dynamicobject/DynamicObject.java
// static String serialize(Object o) {
//     return EdnSerialization.serialize(o);
// }


// Path: src/test/java/com/github/rschmitt/dynamicobject/SchemaCollectionTest.java
import static com.github.rschmitt.dynamicobject.DynamicObject.deserialize;
import static com.github.rschmitt.dynamicobject.DynamicObject.newInstance;
import static com.github.rschmitt.dynamicobject.DynamicObject.serialize;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;


        Coll actual = newInstance(Coll.class).set(set);

        roundTripTest(expected, Coll.class);
        roundTripTest(actual, Coll.class);
        assertEquals(expected, actual);
        assertEquals(set, expected.set());
        assertEquals(set, actual.set());
        assertEquals(actual.set(), set);
        assertEquals(expected.set(), set);
    }

    @Test
    public void map() {
        Coll expected = deserialize("#Coll{:map {#X{:y 1}, #X{:y 2}}}", Coll.class);
        Map<X, X> map = new HashMap<>();
        map.put(newInstance(X.class).y(1), newInstance(X.class).y(2));

        Coll actual = newInstance(Coll.class).map(map);

        roundTripTest(expected, Coll.class);
        roundTripTest(actual, Coll.class);
        assertEquals(expected, actual);
        assertEquals(map, expected.map());
        assertEquals(map, actual.map());
        assertEquals(actual.map(), map);
        assertEquals(expected.map(), map);
    }

    private <D extends DynamicObject<D>> void roundTripTest(D obj, Class<D> type) {
        String edn = serialize(obj);