@Test
  public void testDefaultVisibilityServiceProperties() throws Exception {
    // Given
    String serviceInfoXml =
        "<metainfo>" +
            "  <schemaVersion>2.0</schemaVersion>" +
            "  <services>" +
            "    <service>" +
            "      <name>WITH_PROPS</name>" +
            "      <displayName>WITH_PROPS</displayName>" +
            "      <properties>" +
            "        <property>" +
            "          <name>PROP1</name>" +
            "          <value>VAL1</value>" +
            "        </property>" +
            "        <property>" +
            "          <name>PROP2</name>" +
            "          <value>VAL2</value>" +
            "        </property>" +
            "      </properties>" +
            "    </service>" +
            "  </services>" +
            "</metainfo>";

    // When
    Map<String, ServiceInfo> serviceInfoMap = getServiceInfo(serviceInfoXml);

    // Then
    Map<String, String> serviceProperties = serviceInfoMap.get("WITH_PROPS").getServiceProperties();


    assertTrue("true".equals(serviceProperties.get(ServiceInfo.DEFAULT_SERVICE_INSTALLABLE_PROPERTY.getKey())));
    assertTrue("true".equals(serviceProperties.get(ServiceInfo.DEFAULT_SERVICE_MANAGED_PROPERTY.getKey())));
    assertTrue("true".equals(serviceProperties.get(ServiceInfo.DEFAULT_SERVICE_MONITORED_PROPERTY.getKey())));
  }
Tests the presence and absence of the credential-store block.

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