@Test
  public void testSessionDefaultUser() throws Exception {
    SessionState ss = new SessionState(getAuthV2HiveConf());
    setupDataNucleusFreeHive(ss.getConf());
    SessionState.start(ss);

    Assert.assertEquals("check username", ss.getAuthenticator().getUserName(),
        HiveAuthorizerStoringUserNameFactory.username);
  }
Test if the authorization factory gets the username provided by
the authenticator, if SesstionState is created without username
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/parse/authorization/TestSessionUserName.java