Fix TerminalEmulator unit test