def METHOD_NAME(self, text):
    stdin = open('CONIN$', 'r')
    old_stdin = sys.stdin
    try:
        sys.stdin = stdin
        write_input(
            stdin.buffer.raw,
            (text + '\r\n').encode('utf-16-le', 'surrogatepass')
        )
        actual = input()
    finally:
        sys.stdin = old_stdin
    self.assertEqual(actual, text)