@Test
public void getResourcesRespectsVisibility() throws Exception {

  quicklinkProfile = Resources.toString(Resources.getResource("example_quicklinks_profile.json"), Charsets.UTF_8);
  QuickLinkArtifactResourceProvider provider = createProvider();
  Predicate predicate = new PredicateBuilder().property(
      QuickLinkArtifactResourceProvider.STACK_NAME_PROPERTY_ID).equals("HDP").
      and().
      property(QuickLinkArtifactResourceProvider.STACK_VERSION_PROPERTY_ID).equals("2.0.6").
      and().
      property(QuickLinkArtifactResourceProvider.STACK_SERVICE_NAME_PROPERTY_ID).equals("YARN").
      toPredicate();
  Set<Resource> resources =
      provider.getResources(PropertyHelper.getReadRequest(Sets.<String>newHashSet()), predicate);
  Map<String, Link> linkMap = getLinks(resources);
  for (Map.Entry<String, Link> entry: linkMap.entrySet()) {
    assertTrue("Only resourcemanager_ui should be visible.",
        entry.getValue().isVisible() == entry.getKey().equals("resourcemanager_ui"));
  }
}