public static void main(String[] args) throws InterruptedException
    {
        terminal = new TestTerminalFactory(args).createTerminal();
        terminal.enterPrivateMode();
        terminal.clearScreen();
        terminal.moveCursor(10, 5);
        terminal.putCharacter('H');
        terminal.putCharacter('e');
        terminal.putCharacter('l');
        terminal.putCharacter('l');
        terminal.putCharacter('o');
        terminal.putCharacter('!');
        terminal.moveCursor(0, 0);
        terminal.addResizeListener(new TerminalResizeTest());

        while(true) {
            Key key = terminal.readInput();
            if(key == null || key.getCharacter() != 'q')
                Thread.sleep(1);
            else
                break;
        }
        terminal.exitPrivateMode();
    }