@Test public void testNoLabels() throws IOException { IteratorSetting is = new IteratorSetting(1, VisibilityFilter.class); VisibilityFilter.setNegate(is, false); VisibilityFilter.setAuthorizations(is, new Authorizations()); TreeMap<Key,Value> source = createUnprotectedSource(5, 2); verify(source, 7, is.getOptions(), GOOD, GOOD, EMPTY_VIS, 5); VisibilityFilter.setNegate(is, true); verify(source, 7, is.getOptions(), BAD, BAD, GOOD_VIS, 2); }
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);  }