@Test
  public void testNoMatchingRule() throws Exception {
    Component component1 = Component.create(NAMENODE,
        ImmutableList.of(Filter.linkAttributeFilter(SSO, true)));

    Component component2 = Component.create("DATANODE",
        ImmutableList.of(Filter.acceptAllFilter(true)));

    Service service1 = Service.create(HDFS,
        ImmutableList.of(Filter.linkAttributeFilter(SSO, true)),
        ImmutableList.of(component1, component2));

    Service service2 = Service.create("YARN",
        ImmutableList.of(Filter.acceptAllFilter(true)),
        ImmutableList.of());

    QuickLinksProfile profile = QuickLinksProfile.create(
        ImmutableList.of(Filter.linkAttributeFilter(SSO, true)),
        ImmutableList.of(service1, service2));

    DefaultQuickLinkVisibilityController evaluator = new DefaultQuickLinkVisibilityController(profile);
    assertFalse("No filters should have been applied, so default false should have been returned.",
        evaluator.isVisible(HDFS, namenodeUi));
  }
Test to prove that the link is hidden if no filters apply.
ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinkVisibilityControllerTest.java