CIDR implements Range<IPAddress> { @Value.Parameter public abstract String value();  @Value.Parameter abstract String value(); @Override boolean isInRange(IPAddress candidate);  }
@Test public void invalid_cidr() throws Exception { Throwable thrown = catchThrowable(() -> { ImmutableCIDR.builder() .value("1234") .build(); } ); assertThat(thrown).hasMessageContaining("Invalid CIDR block : 1234"); }
@Test public void valid_cidr() throws Exception { ImmutableCIDR.builder() .value("192.168.0.1/24") .build(); }