@Test
    public void canCopySettingsIntoWriter() {
        CodeWriter a = new CodeWriter();
        a.setNewline("\r\n");
        a.setExpressionStart('#');
        a.setIndentText("  ");
        a.setNewlinePrefix(".");
        a.trimTrailingSpaces(true);
        a.trimBlankLines(2);
        a.insertTrailingNewline(false);

        CodeWriter b = new CodeWriter();
        b.copySettingsFrom(a);
        b.indent();

        assertThat(b.getExpressionStart(), equalTo('#'));
        assertThat(b.getNewline(), equalTo("\r\n"));
        assertThat(b.getIndentText(), equalTo("  "));
        assertThat(b.getNewlinePrefix(), equalTo("."));
        assertThat(b.getTrimTrailingSpaces(), equalTo(true));
        assertThat(b.getTrimBlankLines(), equalTo(2));
        assertThat(b.getInsertTrailingNewline(), equalTo(false));
        assertThat(b.getIndentLevel(), equalTo(1));
        assertThat(a.getIndentLevel(), equalTo(0));
    }
\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