// 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 <D extends DynamicObject<D>> void registerTag(Class<D> type, String tag) {
//     Serialization.registerTag(type, tag);
// }
// 
// 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/TestUtils.java
// public static void assertEquivalent(String expected, String actual) {
//     assertEquals(genericRead(expected), genericRead(actual));
// }


import static com.github.rschmitt.dynamicobject.DynamicObject.newInstance;
import static com.github.rschmitt.dynamicobject.DynamicObject.registerTag;
import static com.github.rschmitt.dynamicobject.DynamicObject.serialize;
import static com.github.rschmitt.dynamicobject.TestUtils.assertEquivalent;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

        nestedTagged = emptyTagged.tagged(emptyTagged).untagged(emptyUntagged);
        nestedUntagged = emptyUntagged.tagged(emptyTagged).untagged(emptyUntagged);
    }

    @Test
    public void toStringTest() {
        assertEquivalent("#Tagged{}", emptyTagged.toString());
        assertEquivalent("{}", emptyUntagged.toString());
        assertEquivalent("#Tagged{:untagged {}, :tagged #Tagged{}}", nestedTagged.toString());
        assertEquivalent("{:untagged {}, :tagged #Tagged{}}", nestedUntagged.toString());
    }

    @Test
    public void toFormattedStringTest() {
        assertEquivalent("#Tagged{}", emptyTagged.toFormattedString());
        assertEquivalent("{}", emptyUntagged.toFormattedString());
        assertEquivalent("#Tagged{:untagged {}, :tagged #Tagged{}}", nestedTagged.toFormattedString());
        assertEquivalent("{:untagged {}, :tagged #Tagged{}}", nestedUntagged.toFormattedString());
    }

    @Test
    public void serializeTest() {
        assertEquivalent("#Tagged{}", serialize(emptyTagged));
        assertEquivalent("{}", serialize(emptyUntagged));
        assertEquivalent("#Tagged{:untagged {}, :tagged #Tagged{}}", serialize(nestedTagged));
        assertEquivalent("{:untagged {}, :tagged #Tagged{}}", serialize(nestedUntagged));
    }

    public interface Tagged extends DynamicObject<Tagged> {
// 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 <D extends DynamicObject<D>> void registerTag(Class<D> type, String tag) {
//     Serialization.registerTag(type, tag);
// }
// 
// 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/TestUtils.java
// public static void assertEquivalent(String expected, String actual) {
//     assertEquals(genericRead(expected), genericRead(actual));
// }


// Path: src/test/java/com/github/rschmitt/dynamicobject/PrintingTest.java
import static com.github.rschmitt.dynamicobject.DynamicObject.newInstance;
import static com.github.rschmitt.dynamicobject.DynamicObject.registerTag;
import static com.github.rschmitt.dynamicobject.DynamicObject.serialize;
import static com.github.rschmitt.dynamicobject.TestUtils.assertEquivalent;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;


        nestedTagged = emptyTagged.tagged(emptyTagged).untagged(emptyUntagged);
        nestedUntagged = emptyUntagged.tagged(emptyTagged).untagged(emptyUntagged);
    }

    @Test
    public void toStringTest() {
        assertEquivalent("#Tagged{}", emptyTagged.toString());
        assertEquivalent("{}", emptyUntagged.toString());
        assertEquivalent("#Tagged{:untagged {}, :tagged #Tagged{}}", nestedTagged.toString());
        assertEquivalent("{:untagged {}, :tagged #Tagged{}}", nestedUntagged.toString());
    }

    @Test
    public void toFormattedStringTest() {
        assertEquivalent("#Tagged{}", emptyTagged.toFormattedString());
        assertEquivalent("{}", emptyUntagged.toFormattedString());
        assertEquivalent("#Tagged{:untagged {}, :tagged #Tagged{}}", nestedTagged.toFormattedString());
        assertEquivalent("{:untagged {}, :tagged #Tagged{}}", nestedUntagged.toFormattedString());
    }

    @Test
    public void serializeTest() {
        assertEquivalent("#Tagged{}", serialize(emptyTagged));
        assertEquivalent("{}", serialize(emptyUntagged));
        assertEquivalent("#Tagged{:untagged {}, :tagged #Tagged{}}", serialize(nestedTagged));
        assertEquivalent("{:untagged {}, :tagged #Tagged{}}", serialize(nestedUntagged));
    }

    public interface Tagged extends DynamicObject<Tagged> {
        @Key(":tagged") Tagged tagged(Tagged tagged);