@Test public void testValidFieldName() { String validCustomEntityId = "validCustomEntity1"; EntityBody validCustomEntity = new EntityBody(); validCustomEntity.put("ID", validCustomEntityId); validCustomEntity.put("goodFieldName", "goodFieldValue"); List<ValidationError> validationErrors = customEntityValidator.validate(validCustomEntity); Assert.assertTrue("There should be no validation errors", validationErrors.isEmpty()); }
public List<ValidationError> validate(EntityBody entityBody) { List<ValidationError> errorList = new ArrayList<ValidationError>(); if (!entityBody.isEmpty()) { validate(entityBody, errorList); } return errorList; }
CustomEntityValidator { public List<ValidationError> validate(EntityBody entityBody) { List<ValidationError> errorList = new ArrayList<ValidationError>(); if (!entityBody.isEmpty()) { validate(entityBody, errorList); } return errorList; } }
CustomEntityValidator { public List<ValidationError> validate(EntityBody entityBody) { List<ValidationError> errorList = new ArrayList<ValidationError>(); if (!entityBody.isEmpty()) { validate(entityBody, errorList); } return errorList; }  }
CustomEntityValidator { public List<ValidationError> validate(EntityBody entityBody) { List<ValidationError> errorList = new ArrayList<ValidationError>(); if (!entityBody.isEmpty()) { validate(entityBody, errorList); } return errorList; }  List<ValidationError> validate(EntityBody entityBody); }
CustomEntityValidator { public List<ValidationError> validate(EntityBody entityBody) { List<ValidationError> errorList = new ArrayList<ValidationError>(); if (!entityBody.isEmpty()) { validate(entityBody, errorList); } return errorList; }  List<ValidationError> validate(EntityBody entityBody);  }