@Test
    public void sectionWithWrite() {
        String testSection = "TEST_SECTION";
        CodeWriter writer = new CodeWriter();

        writer.onSection(testSection, text -> {
            writer.write(text + "addition");
        });

        writer.pushState(testSection);
        writer.popState();

        assertThat(writer.toString(), equalTo("addition\n"));
    }
\n"
                                + " * Foo \"foo!\"\n"
                                + " *\n"
                                + " * \"baz\"!\n"
                                + " * Yap!\n"
                                + " *     This is indented, in flow of parent.\n"
                                + " *     Yap!\n"
                                + " *     Yap?\n"
                                + " *     # Has a prefix\n"
                                + " *     # Yes\n"
                                + "
smithy-utils/src/test/java/software/amazon/smithy/utils/CodeWriterTest.java