@Override
            public void close() throws IOException {
                write(RESET_CODE);
                flush();
                super.close();
            }
This is actually a modified copy of AnsiConsole from the jansi project.
We had to copy it, because we want to be able to disable the tty detection.
jgiven-core/src/main/java/com/tngtech/jgiven/impl/util/AnsiUtil.java