OIDValidator implements ValueValidator { @Override public void validate(String oid) throws XDSMetaDataException { notNull(oid, "oid cannot be null"); metaDataAssert(oid.length() <= 64, OID_TOO_LONG, oid); metaDataAssert(OID_PATTERN.matcher(oid).matches(), INVALID_OID, oid); }  @Override void validate(String oid);  }
@Test public void testValidateGoodCases() throws XDSMetaDataException { validator.validate("1.2323"); validator.validate("1.0.2323"); validator.validate("1.23.45.67.89.1.23.45.67.89.1.23.45.67.89.1.23.45.67.89.1.23.456"); }