EdmBinary extends SingletonPrimitiveType { @Override public boolean validate(final String value, final Boolean isNullable, final Integer maxLength, final Integer precision, final Integer scale, final Boolean isUnicode) { return value == null ? isNullable == null || isNullable : isBase64(value.getBytes(UTF_8)) && validateMaxLength(value, maxLength); }  static EdmBinary getInstance(); @Override Class<?> getDefaultType(); @Override boolean validate(final String value,
      final Boolean isNullable, final Integer maxLength, final Integer precision,
      final Integer scale, final Boolean isUnicode);  }
@Test public void validate() throws Exception { assertTrue(instance.validate(null, null, null, null, null, null)); assertTrue(instance.validate(null, true, null, null, null, null)); assertFalse(instance.validate(null, false, null, null, null, null)); assertTrue(instance.validate("", null, null, null, null, null)); assertFalse(instance.validate("????", null, null, null, null, null)); assertTrue(instance.validate("qrvM3e7_", null, null, null, null, null)); assertTrue(instance.validate("qrvM3e7_", null, 6, null, null, null)); assertFalse(instance.validate("qrvM3e7_", null, 5, null, null, null)); }