@AfterClass
  public static void clear() {
    System.clearProperty("java.security.krb5.kdc");
    System.clearProperty("java.security.krb5.realm");
    Configuration conf = new Configuration();
    SecurityUtil.setAuthenticationMethod(UserGroupInformation.AuthenticationMethod.SIMPLE, conf);
    UserGroupInformation.setConfiguration(conf);
  }
Tests for {@link DagUtils} where {@link UserGroupInformation#isSecurityEnabled()} is true.
ql/src/test/org/apache/hadoop/hive/ql/exec/tez/TestDagUtilsSecurityEnabled.java