assertTrue(v4matcher.matches(ipv4Request));
}
@Test
public void ipv4SubnetMatchesCorrectly() throws Exception {
IpAddressMatcher matcher = new IpAddressMatcher("192.168.1.0/24");
assertTrue(matcher.matches(ipv4Request));
matcher = new IpAddressMatcher("192.168.1.128/25");
assertFalse(matcher.matches(ipv4Request));
ipv4Request.setRemoteAddr("192.168.1.159"); // 159 = 0x9f
assertTrue(matcher.matches(ipv4Request));
}