@Test
    public void writesStackTraceInfo() {
        MyCustomWriter writer = new MyCustomWriter();
        writer.enableStackTraceComments(true);

        writer.writeWithNoFormatting("Hello 1");
        writer.write("Hello 2");
        writer.indent().write("Hello 3");
        writer.writeInline("Hello 4");
        writer.writeInline("Hello 5");
        String[] result = writer.toString().split("\n");

        assertThat(result[0], startsWith("/* software.amazon.smithy.utils.CodeWriterTest.writesStackTraceInfo"));
        assertThat(result[0], endsWith("*/ Hello 1"));
        assertThat(result[1], startsWith("/* software.amazon.smithy.utils.CodeWriterTest.writesStackTraceInfo"));
        assertThat(result[1], endsWith("*/ Hello 2"));
        assertThat(result[2], startsWith("    /* software.amazon.smithy.utils.CodeWriterTest.writesStackTraceInfo"));
        assertThat(result[2], endsWith("*/ Hello 3"));
        assertThat(result[3], startsWith("    /* software.amazon.smithy.utils.CodeWriterTest.writesStackTraceInfo"));
        assertThat(result[3], containsString("Hello 4"));
        assertThat(result[3], endsWith("*/ Hello 5"));
    }
\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