AttributeDefinition implements Serializable { public FieldValidator getValidator() { return validator; }  String getId(); LocalizableString getName(); LocalizableString getDescription(); boolean hasDescription(); LocalizableString getDefaultValue(); boolean isRequired(); List<Option> getOptions(); boolean isBoolean(); boolean isPassword(); boolean isOAuth(); OAuthData getOAuthConfiguration(); FieldValidator getValidator(); static Builder builder(StringLocalizer strings); @Override String toString();  }
@Test public void testBuildWithValidator_shouldReturnSameValidator() throws Exception { @SuppressWarnings("serial") FieldValidator fieldValidator = new FieldValidator() { @Override public SingleAttributeValidationResult validate(String validate) { return null; } }; builder.validator(fieldValidator); AttributeDefinition build = builder.build(); Assert.assertSame(fieldValidator, build.getValidator()); }