### Question:
QuickLinksProfileBuilder { public String buildQuickLinksProfile(@Nullable Object globalFiltersRaw, @Nullable Object serviceFiltersRaw) throws QuickLinksProfileEvaluationException { try { List<Filter> globalFilters = buildQuickLinkFilters(globalFiltersRaw); List<Service> services = buildServices(serviceFiltersRaw); QuickLinksProfile profile = QuickLinksProfile.create(globalFilters, services); new DefaultQuickLinkVisibilityController(profile); return new QuickLinksProfileParser().encode(profile); } catch (QuickLinksProfileEvaluationException ex) { throw ex; } catch (Exception ex) { throw new QuickLinksProfileEvaluationException("Error interpreting quicklinks profile data", ex); } }  String buildQuickLinksProfile(@Nullable Object globalFiltersRaw, @Nullable Object serviceFiltersRaw); static final String NAME; static final String COMPONENTS; static final String FILTERS; static final Set<String> ALLOWED_FILTER_ATTRIBUTES; }### Answer:
@Test public void testBuildProfileBothGlobalAndServiceFilters() throws Exception { Set<Map<String, String>> globalFilters = newHashSet( filter(null, null, false) ); Map<String, Object> nameNode = component( "NAMENODE", newHashSet( filter("namenode_ui", null, false), filter("namenode_logs", null, "http: ) ); Map<String, Object> hdfs = service("HDFS", newHashSet(nameNode), newHashSet(filter(null, "sso", true))); Set<Map<String, Object>> services = Sets.newHashSet(hdfs); String profileJson = new QuickLinksProfileBuilder().buildQuickLinksProfile(globalFilters, services); QuickLinksProfile profile = new QuickLinksProfileParser().parse(profileJson.getBytes()); assertFilterExists(profile, null, null, Filter.acceptAllFilter(false)); assertFilterExists(profile, "HDFS", "NAMENODE", Filter.linkNameFilter("namenode_ui", false)); assertFilterExists(profile, "HDFS", "NAMENODE", Filter.linkNameFilter("namenode_ui", false)); assertFilterExists(profile, "HDFS", "NAMENODE", Filter.linkNameFilter("namenode_logs", "http: assertFilterExists(profile, "HDFS", null, Filter.linkAttributeFilter("sso", true)); }