@Test public void testFilterUnauthorizedAndBad() throws IOException { IteratorSetting is = new IteratorSetting(1, VisibilityFilter.class); VisibilityFilter.setAuthorizations(is, new Authorizations("def")); TreeMap<Key,Value> source = createSourceWithHiddenData(1, 5); for (Entry<Key,Value> entry : createPollutedSource(0, 1).entrySet()) source.put(entry.getKey(), entry.getValue()); verify(source, 7, is.getOptions(), GOOD, GOOD, GOOD_VIS, 1); }
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);  }