@Test public void testAllowAuthorizedLabelsOnly() throws IOException { IteratorSetting is = new IteratorSetting(1, VisibilityFilter.class); VisibilityFilter.setAuthorizations(is, new Authorizations("def")); TreeMap<Key,Value> source = createSourceWithHiddenData(1, 2); verify(source, 3, is.getOptions(), GOOD, GOOD, GOOD_VIS, 1); source = createSourceWithHiddenData(30, 500); verify(source, 530, is.getOptions(), GOOD, GOOD, GOOD_VIS, 30); source = createSourceWithHiddenData(1000, 500); verify(source, 1500, is.getOptions(), GOOD, GOOD, GOOD_VIS, 1000); }
public static void setAuthorizations(IteratorSetting setting, Authorizations auths) { setting.addOption(AUTHS, auths.serialize()); }
VisibilityFilter extends Filter implements OptionDescriber { public static void setAuthorizations(IteratorSetting setting, Authorizations auths) { setting.addOption(AUTHS, auths.serialize()); } }
VisibilityFilter extends Filter implements OptionDescriber { public static void setAuthorizations(IteratorSetting setting, Authorizations auths) { setting.addOption(AUTHS, auths.serialize()); }  }
VisibilityFilter extends Filter implements OptionDescriber { public static void setAuthorizations(IteratorSetting setting, Authorizations auths) { setting.addOption(AUTHS, auths.serialize()); }  @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override boolean accept(Key k, Value v); @Override IteratorOptions describeOptions(); static void setAuthorizations(IteratorSetting setting, Authorizations auths); static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled); }
VisibilityFilter extends Filter implements OptionDescriber { public static void setAuthorizations(IteratorSetting setting, Authorizations auths) { setting.addOption(AUTHS, auths.serialize()); }  @Override void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options,
      IteratorEnvironment env); @Override boolean accept(Key k, Value v); @Override IteratorOptions describeOptions(); static void setAuthorizations(IteratorSetting setting, Authorizations auths); static void filterInvalidLabelsOnly(IteratorSetting setting, boolean featureEnabled);  }