ConsoleAppender { public void foldPrintln(String... phrases) { foldPrintln(asList(phrases)); } ConsoleAppender(Appendable out, int lineWidth); protected  ConsoleAppender(ConsoleAppender proto); ConsoleAppender withOffset(int offset); ConsoleAppender withOffset(String offset); void println(); void println(String... phrases); void println(Collection<String> phrases); void foldPrintln(String... phrases); void foldPrintln(Collection<String> phrases);  }
@Test public void testFoldPrintln() { StringBuilder out = new StringBuilder(); ConsoleAppender appender = new ConsoleAppender(out, 20); appender.foldPrintln("a", "b", "cd"); assertEquals("abcd" + ConsoleAppender.NEWLINE, out.toString()); }
@Test public void testFoldPrintln_Long() { StringBuilder out = new StringBuilder(); ConsoleAppender appender = new ConsoleAppender(out, 20); appender.foldPrintln("012345", " 01234567890", " 01234567890", " 01234567890"); assertEquals("012345 01234567890" + ConsoleAppender.NEWLINE + "01234567890" + ConsoleAppender.NEWLINE + "01234567890" + ConsoleAppender.NEWLINE, out.toString()); }
@Test public void testFoldPrintln_Long_NoSpace() { StringBuilder out = new StringBuilder(); ConsoleAppender appender = new ConsoleAppender(out, 20); appender.foldPrintln("012345", "01234567890", "01234567890", "01234567890"); assertEquals("01234501234567890012" + ConsoleAppender.NEWLINE + "3456789001234567890" + ConsoleAppender.NEWLINE, out.toString()); }