public static boolean isMetadataFoundForEntityId(final MetadataResolverAdapter metadataAdapter, final String entityId) {
        return metadataAdapter.getEntityDescriptorForEntityId(entityId) != null;
    }
Is metadata found for entity id ?

@param metadataAdapter the metadata adapter
@param entityId        the entity id
@return true/false
support/cas-server-support-saml-mdui-core/src/main/java/org/apereo/cas/support/saml/mdui/MetadataUIUtils.java