public static Map<String, String> filter(@Nullable String linkName,
                                           @Nullable String attributeName,
                                           @Nullable String linkUrl,
                                           boolean visible) {
    Map<String, String> map = new HashMap<>(4);
    if (null != linkName) {
      map.put(LinkNameFilter.LINK_NAME, linkName);
    }
    if (null != linkUrl) {
      map.put(LinkNameFilter.LINK_URL, linkUrl);
    }
    if (null != attributeName) {
      map.put(LinkAttributeFilter.LINK_ATTRIBUTE, attributeName);
    }
    map.put(Filter.VISIBLE, Boolean.toString(visible));
    return map;
  }
Verifies that the filter specified by the arguments exists in the received {@link QuickLinksProfile}
@param profile the {@link QuickLinksProfile} to examine
@param serviceName the service name where the filter is defined. {@code null} means the searched filter is a global
                   filter
@param componentName the component name where the filter is defined. Only makes sense when serviceName is defined
                   too. {@code null} means the searched filter is a service level filter, not component level one.
                   filter
@param filter the {@link Filter} to look for.
ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinksProfileBuilderTest.java