@Test
  public void testSupportDeleteViaUI() throws Exception {
    //Explicitly set to true
    String serviceInfoXml =
        "<metainfo>" +
            "  <schemaVersion>2.0</schemaVersion>" +
            "  <services>" +
            "    <service>" +
            "      <name>HDFS</name>" +
            "      <displayName>HDFS</displayName>" +
            "      <supportDeleteViaUI>true</supportDeleteViaUI>" +
            "    </service>" +
            "  </services>" +
            "</metainfo>";
    Map<String, ServiceInfo> serviceInfoMap = getServiceInfo(serviceInfoXml);
    assertTrue(serviceInfoMap.get("HDFS").isSupportDeleteViaUI());

    //Explicitly set to false
    serviceInfoXml =
        "<metainfo>" +
            "  <schemaVersion>2.0</schemaVersion>" +
            "  <services>" +
            "    <service>" +
            "      <name>HDFS</name>" +
            "      <displayName>HDFS</displayName>" +
            "      <supportDeleteViaUI>false</supportDeleteViaUI>" +
            "    </service>" +
            "  </services>" +
            "</metainfo>";
    serviceInfoMap = getServiceInfo(serviceInfoXml);
    assertFalse(serviceInfoMap.get("HDFS").isSupportDeleteViaUI());

    //Default to true
    serviceInfoXml =
        "<metainfo>" +
            "  <schemaVersion>2.0</schemaVersion>" +
            "  <services>" +
            "    <service>" +
            "      <name>HDFS</name>" +
            "      <displayName>HDFS</displayName>" +
            "    </service>" +
            "  </services>" +
            "</metainfo>";
    serviceInfoMap = getServiceInfo(serviceInfoXml);
    assertTrue(serviceInfoMap.get("HDFS").isSupportDeleteViaUI());
  }
Tests the presence and absence of the credential-store block.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/state/ServiceInfoTest.java