@Test public void shouldReturnTrueDupIpInAllowAndDenyListWhenAllowFirst() { Config config = new Config(); config.setAllowFirst(true); config.allow("1.2.3.4"); config.deny("1.2.3.4"); IpFilter ipFilter = new ConfigIpFilter(config); assertTrue(ipFilter.accept("1.2.3.4")); }
@Override public boolean accept(String ip) { if (allowFirst) return accepAllowFirst(ip); else return acceptDenyFirst(ip); }
ConfigIpFilter implements IpFilter { @Override public boolean accept(String ip) { if (allowFirst) return accepAllowFirst(ip); else return acceptDenyFirst(ip); } }
ConfigIpFilter implements IpFilter { @Override public boolean accept(String ip) { if (allowFirst) return accepAllowFirst(ip); else return acceptDenyFirst(ip); } ConfigIpFilter(Config config); }
ConfigIpFilter implements IpFilter { @Override public boolean accept(String ip) { if (allowFirst) return accepAllowFirst(ip); else return acceptDenyFirst(ip); } ConfigIpFilter(Config config); @Override boolean accept(String ip); }
ConfigIpFilter implements IpFilter { @Override public boolean accept(String ip) { if (allowFirst) return accepAllowFirst(ip); else return acceptDenyFirst(ip); } ConfigIpFilter(Config config); @Override boolean accept(String ip);  }