@Test
  public void testClusterConfigsUnmappingOnDeleteAllServiceConfigs() throws AmbariException {
    String serviceName = "HDFS";
    Service s = serviceFactory.createNew(cluster, serviceName, repositoryVersion);
    cluster.addService(s);

    Service service = cluster.getService(serviceName);

    // add some cluster and service configs
    Config config1 = configFactory.createNew(cluster, "hdfs-site", "version1",
        new HashMap<String, String>() {{ put("a", "b"); }}, new HashMap<>());
    cluster.addDesiredConfig("admin", Collections.singleton(config1));

    Config config2 = configFactory.createNew(cluster, "hdfs-site", "version2",
        new HashMap<String, String>() {{ put("a", "b"); }}, new HashMap<>());
    cluster.addDesiredConfig("admin", Collections.singleton(config2));


    // check all cluster configs are mapped
    Collection<ClusterConfigEntity> clusterConfigEntities = cluster.getClusterEntity().getClusterConfigEntities();
    for (ClusterConfigEntity clusterConfigEntity : clusterConfigEntities) {
      assertFalse(clusterConfigEntity.isUnmapped());
    }

    ((ServiceImpl)service).deleteAllServiceConfigs();

    // check all cluster configs are unmapped
    clusterConfigEntities = cluster.getClusterEntity().getClusterConfigEntities();
    for (ClusterConfigEntity clusterConfigEntity : clusterConfigEntities) {
      assertTrue(clusterConfigEntity.isUnmapped());
    }
  }
Tests the kerberosEnabledTest value set in the HDFS metainfo file (stacks/HDP/0.1/services/HDFS/metainfo.xml):
<pre>
{
  "or": [
    {
      "equals": [
        "core-site/hadoop.security.authentication",
        "kerberos"
      ]
    },
    {
      "equals": [
        "hdfs-site/hadoop.security.authentication",
        "kerberos"
      ]
    }
  ]
}
</pre>
ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java