PrefixRoutingFilter implements RoutingFilter { @Override public boolean matchFilter(Route route) { boolean match = false; for(NetworkLayerReachabilityInformation filterPrefix : filterPrefixes) { if(filterPrefix.isPrefixOf(route.getNlri()) || filterPrefix.equals(route.getNlri())) { match = true; break; } } return match; }  void configure(PrefixRoutingFilterConfiguration configuration); @Override boolean matchFilter(Route route);  }
@Test public void testEmptyFilter() { Assert.assertFalse(filter.matchFilter(new Route(AddressFamilyKey.IPV4_UNICAST_FORWARDING, new NetworkLayerReachabilityInformation(24, new byte[] { (byte)0xc0, (byte)0xa8, 0x01 }), null, null))); }