// 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 String serialize(Object o) {
//     return EdnSerialization.serialize(o);
// }


import clojure.lang.EdnReader;
import clojure.lang.PersistentHashMap;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static com.github.rschmitt.dynamicobject.DynamicObject.deserialize;
import static com.github.rschmitt.dynamicobject.DynamicObject.serialize;
import static java.lang.String.format;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;

    @AfterEach
    public void teardown() {
        DynamicObject.deregisterTag(EmptyObject.class);
    }

    @Test
    public void getMapReturnsBackingMap() {
        EmptyObject object = deserialize(TaggedEdn, EmptyObject.class);
        Object map = EdnReader.readString(NestedEdn, PersistentHashMap.EMPTY);
        assertEquals(map, object.getMap());
        binaryRoundTrip(object);
    }

    @Test
    public void unknownFieldsAreConsideredForEquality() {
        EmptyObject obj1 = deserialize(SimpleEdn, EmptyObject.class);
        EmptyObject obj2 = deserialize(NestedEdn, EmptyObject.class);
        assertFalse(obj1.equals(obj2));
        binaryRoundTrip(obj1);
        binaryRoundTrip(obj2);
    }

    @Test
    public void unknownFieldsAreSerialized() {
        EmptyObject nestedObj = deserialize(TaggedEdn, EmptyObject.class);
        String actualEdn = serialize(nestedObj);
        assertEquals(TaggedEdn, actualEdn);
    }

// 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 String serialize(Object o) {
//     return EdnSerialization.serialize(o);
// }


// Path: src/test/java/com/github/rschmitt/dynamicobject/MapTest.java
import clojure.lang.EdnReader;
import clojure.lang.PersistentHashMap;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static com.github.rschmitt.dynamicobject.DynamicObject.deserialize;
import static com.github.rschmitt.dynamicobject.DynamicObject.serialize;
import static java.lang.String.format;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;


    @AfterEach
    public void teardown() {
        DynamicObject.deregisterTag(EmptyObject.class);
    }

    @Test
    public void getMapReturnsBackingMap() {
        EmptyObject object = deserialize(TaggedEdn, EmptyObject.class);
        Object map = EdnReader.readString(NestedEdn, PersistentHashMap.EMPTY);
        assertEquals(map, object.getMap());
        binaryRoundTrip(object);
    }

    @Test
    public void unknownFieldsAreConsideredForEquality() {
        EmptyObject obj1 = deserialize(SimpleEdn, EmptyObject.class);
        EmptyObject obj2 = deserialize(NestedEdn, EmptyObject.class);
        assertFalse(obj1.equals(obj2));
        binaryRoundTrip(obj1);
        binaryRoundTrip(obj2);
    }

    @Test
    public void unknownFieldsAreSerialized() {
        EmptyObject nestedObj = deserialize(TaggedEdn, EmptyObject.class);
        String actualEdn = serialize(nestedObj);
        assertEquals(TaggedEdn, actualEdn);
    }

    @Test