@Test
  public void testServiceLevelFiltersEvaluatedSecondly() throws Exception {
    Component component = Component.create(NAMENODE,
        ImmutableList.of(Filter.linkAttributeFilter(SSO, false)));

    Service service = Service.create(HDFS,
        ImmutableList.of(Filter.linkAttributeFilter(AUTHENTICATED, true)),
        ImmutableList.of(component));

    QuickLinksProfile profile = QuickLinksProfile.create(
        ImmutableList.of(Filter.acceptAllFilter(false)),
        ImmutableList.of(service));

    DefaultQuickLinkVisibilityController evaluator = new DefaultQuickLinkVisibilityController(profile);
    assertTrue("Component level filter should have been applied.", evaluator.isVisible(HDFS, namenodeUi));
  }
Test to prove that service level filters are evaluated secondly.
ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinkVisibilityControllerTest.java