@Test
    public void canPushAndPopState() {
        SimpleCodeWriter writer = new SimpleCodeWriter();
        writer
                .setNewlinePrefix("0: ")
                .write("Hi")
                .pushState()
                .indent(2)
                .setNewlinePrefix("2: ")
                .write("there,")
                .pushState()
                .indent(2)
                .setNewlinePrefix("4: ")
                .write("guy")
                .popState()
                .write("Foo")
                .popState()
                .write("baz");

        assertThat(
                writer.toString(),
                equalTo("0: Hi\n        2: there,\n                4: guy\n        2: Foo\n0: baz\n"));
    }
\n     * This is some docs.\n     * And more docs.\n     *\n     * Foo.\n
smithy-utils/src/test/java/software/amazon/smithy/utils/SimpleCodeWriterTest.java