IndentedOutputWriter { public void writeLine(String line) { String indentString = ""; for (int i = 0; !line.isEmpty() && i < indent; i++) { indentString += this.typeSettings.indentString; } write(indentString + line + this.typeSettings.newline); } IndentedOutputWriter(OutputStream stream, TypescriptServiceGeneratorConfiguration settings); void close(); void decreaseIndent(); void increaseIndent(); void write(String line); void writeLine(String line);  }
@Test public void testWriteLine() { writer.writeLine("asdf"); writer.close(); assertEquals("asdf\n", new String(stream.toByteArray())); }