@AfterClass
  public static void afterClass() throws Exception {
    if (KDC != null) {
      KDC.stop();
    }
    UTIL.shutdownMiniCluster();
  }
Sets the security firstly for getting the correct default realm.
hbase-endpoint/src/test/java/org/apache/hadoop/hbase/coprocessor/TestSecureExport.java