public boolean testAdministratorCredentials() throws KerberosOperationException {
    if (!isOpen()) {
      throw new KerberosOperationException("This operation handler has not been opened");
    }

    PrincipalKeyCredential credential = getAdministratorCredential();
    if (credential == null) {
      throw new KerberosOperationException("Missing KDC administrator credential");
    } else {
      return principalExists(credential.getPrincipal(), false);
    }
  }
Tests to ensure the connection information and credentials allow for administrative
connectivity to the KDC

@return true of successful; otherwise false
@throws KerberosOperationException if a failure occurs while testing the
                                   administrator credentials
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosOperationHandler.java