@Override
  public void beforeTest(QTestUtil qt) throws Exception {
  }
QTest replacement directive handler

Examples:

--! qt:replace:/there/joe/
select 'hello there!
===q.out
hello joe!

standard java regex; placeholders also work:
--! qt:replace:/Hello (.*)!/$1 was here!/

first char of regex pattern is used as separator; you may choose anything else than '/'
--! qt:replace:#this#that#
itests/util/src/main/java/org/apache/hadoop/hive/ql/qoption/QTestReplaceHandler.java