InteractiveStatusPrintStream extends StatusPrintStream { @Override public void status(String line) { status.status(line); } InteractiveStatusPrintStream(PrintStream printStream, ConsoleStatus status, String color); @Override void printfln(String format, Object... args); @Override void status(String line); @Override void status(boolean value); @Override void status(char value); @Override void status(int value); @Override void status(long value); @Override void status(float value); @Override void status(double value); @Override void status(char[] value); @Override void status(Object value); @Override void statusf(String format, Object... args); @Override void clearStatus(); @Override void flush(); @Override void close(); @Override boolean checkError(); @Override void write(int b); @Override void write(byte[] buffer, int offset, int length); @Override void print(boolean value); @Override void print(int value); @Override void print(long value); @Override void print(float value); @Override void print(double value); @Override void print(Object value); @Override void print(char value); @Override void print(char[] value); @Override void print(String value); @Override void println(); @Override void println(boolean value); @Override void println(char value); @Override void println(int value); @Override void println(long value); @Override void println(float value); @Override void println(double value); @Override void println(Object value); @Override void println(char[] value); @Override void println(String value); @Override PrintStream printf(String format, Object... args); @Override PrintStream printf(Locale locale, String format, Object... args); @Override PrintStream format(String format, Object... args); @Override PrintStream format(Locale locale, String format, Object... args); @Override PrintStream append(CharSequence sequence); @Override PrintStream append(CharSequence sequence, int start, int end); @Override PrintStream append(char c);  }
@Test(groups = "fast") public void testStatus() { out.print("Hello, world!"); out.status("Overwrite"); out.status("Again"); out.status("and again..."); out.status("and again!"); err.println("Also overwrite"); out.status("Almost done"); err.println("Good"); out.status("..."); err.println("bye!"); assertOutput( "Hello, world!", "\r\033[2KOverwrite", "\r\033[2KAgain", "\r\033[2Kand again...", "\r\033[2Kand again!", "\r\033[2K\033[1;37;41m\033[KAlso overwrite", "", "\r\033[0m\033[2KAlmost done", "\r\033[2K\033[1;37;41m\033[KGood", "", "\r\033[0m\033[2K...", "\r\033[2K\033[1;37;41m\033[Kbye!", ""); }