@Override
  public void open() throws LoginException, IOException {
    UserGroupInformation ugi = Utils.getUGI();
    user = ugi.getShortUserName();
    this.doAsEnabled = hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_SERVER2_ENABLE_DOAS);
    setOpen(true);
  }
This class is needed for writing junit tests. For testing the multi-session
use case from hive server 2, we need a session simulation.
ql/src/test/org/apache/hadoop/hive/ql/exec/tez/SampleTezSessionState.java