private CommandProcessorResponse runAsUser(String userName, String sql) throws CommandProcessorException {
    return runAsUser(userName, sql, false);
  }
ScheduledQuery integration test.

Checks for more complex scenarios; like impersonation works when scheduled queries are executed.
itests/hive-unit/src/test/java/org/apache/hadoop/hive/schq/TestScheduledQueryIntegration.java