@Test
public void testPrint() {

    CodeOutput output = new CodeOutput();
    output.print("foo");
    output.print("%d", 1);
    output.println("bar%d");
    output.println("baz%d", 1);
    Assert.assertEquals(output.toString(), "foo1bar%d\nbaz1\n");
}