@Override
  public void validate(String name, String value) {
    if (Strings.isNullOrEmpty(value)
        || !InetAddresses.isInetAddress(value)
        || !shouldAccept(InetAddresses.forString(value))) {
      throw new ParameterException(
          String.format(
              "Parameter %s should point to a valid IP v%d address, got '%s'",
              name, ipVersion(), value));
    }
  }
@Test
  public void validate_withValidIpValue_doesNotThrows() {
    for (String validIp : validIps()) {
      try {
        getValidator().validate(flagName(), validIp);
      } catch (ParameterException e) {
        throw new AssertionError("Unexpected ParameterException for IP: " + validIp, e);
      }
    }
  }