jaxbSimulation(dto, ListValidationsDTO.class, ListValidationsDTO.RELATED_CLASSES);
}
public void testListValidationsDTOManyItems() throws Exception {
List<ValidationDescription> validations = new ArrayList<ValidationDescription>();
ValidationDescription validation1 = new ValidationDescription();
validation1.setClassName("org.jbpm.formbuilder.ThisClassDoesntExist");
validation1.setProperties(new HashMap<String, String>());
validations.add(validation1);
ValidationDescription validation2 = new ValidationDescription();
validation2.setClassName("org.jbpm.formbuilder.client.validation.NotEmptyValidationItem");
Map<String, String> notEmptyProps = new HashMap<String, String>();
notEmptyProps.put("message", "aaa");
notEmptyProps.put("message2", "bbb");
validation2.setProperties(notEmptyProps);
validations.add(validation2);
ValidationDescription validation3 = new ValidationDescription();
validation3.setClassName("org.jbpm.formbuilder.client.validation.SomethingValidationItem");
Map<String, String> somethingProps = new HashMap<String, String>();
somethingProps.put("message", "aaa");
validation3.setProperties(somethingProps);
validations.add(validation3);
ListValidationsDTO dto = new ListValidationsDTO(validations);
jaxbSimulation(dto, ListValidationsDTO.class, ListValidationsDTO.RELATED_CLASSES);
}