IndentedOutputWriter { public void write(String line) { writer.write(line); } IndentedOutputWriter(OutputStream stream, TypescriptServiceGeneratorConfiguration settings); void close(); void decreaseIndent(); void increaseIndent(); void write(String line); void writeLine(String line);  }
@Test public void testWrite() { writer.write("fo"); writer.write("o\n"); writer.increaseIndent(); writer.write("bar"); writer.close(); assertEquals("foo\nbar", new String(stream.toByteArray())); }