@BeforeClass
  public static void beforeClass() throws Exception {
    envSetup.getTestCtx().hiveConf.set("hive.users.in.admin.role", "user1");
    IDriver driver = createDriver();
    dropTables(driver);
    String cmds[] = {
        // @formatter:off
        "create table tu(c int)",
        "create database asd",
        "create table asd.tasd(c int)",
        // @formatter:on
    };
    for (String cmd : cmds) {
      driver.run(cmd);
    }

  }
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