public void testValidate() throws Exception {
/* MockAction.class */
// reference number
ValueStack stack = container.getInstance(ValueStackFactory.class).createValueStack();
final RequiredStringValidator referenceNumberRequiredStringValidator = new RequiredStringValidator();
referenceNumberRequiredStringValidator.setFieldName("referenceNumber");
referenceNumberRequiredStringValidator.setDefaultMessage("Reference number is required");
referenceNumberRequiredStringValidator.setValueStack(stack);
// order
final RequiredFieldValidator orderRequiredValidator = new RequiredFieldValidator();
orderRequiredValidator.setFieldName("order");
orderRequiredValidator.setDefaultMessage("Order is required");
orderRequiredValidator.setValueStack(stack);
// customer
final RequiredFieldValidator customerRequiredValidator = new RequiredFieldValidator();
customerRequiredValidator.setFieldName("customer");
customerRequiredValidator.setDefaultMessage("Customer is required");
customerRequiredValidator.setValueStack(stack);
final VisitorFieldValidator customerVisitorValidator = new VisitorFieldValidator();
customerVisitorValidator.setAppendPrefix(true);
customerVisitorValidator.setFieldName("customer");
customerVisitorValidator.setValueStack(stack);
/* Customer.class */
// customer -> name
final RequiredStringValidator customerNameRequiredStringValidator = new RequiredStringValidator();
customerNameRequiredStringValidator.setFieldName("name");
customerNameRequiredStringValidator.setDefaultMessage("Name is required");
customerNameRequiredStringValidator.setValueStack(stack);
// customer -> age
final RequiredFieldValidator customerAgeRequiredValidator = new RequiredFieldValidator();
customerAgeRequiredValidator.setFieldName("age");
customerAgeRequiredValidator.setDefaultMessage("Age is required");
customerAgeRequiredValidator.setValueStack(stack);
// customer -> Address
final RequiredFieldValidator customerAddressRequiredFieldValidator = new RequiredFieldValidator();
customerAddressRequiredFieldValidator.setFieldName("address");
customerAddressRequiredFieldValidator.setDefaultMessage("Address is required");
customerAddressRequiredFieldValidator.setValueStack(stack);
final VisitorFieldValidator customerAddressVisitorFieldValidator = new VisitorFieldValidator();
customerAddressVisitorFieldValidator.setFieldName("address");
customerAddressVisitorFieldValidator.setAppendPrefix(true);
//customerAddressVisitorFieldValidator.setDefaultMessage("");
customerAddressVisitorFieldValidator.setValueStack(stack);
/* Address.class */
// customer -> Address -> street
final RequiredStringValidator customerAddressStreetRequiredFieldValidator = new RequiredStringValidator();
customerAddressStreetRequiredFieldValidator.setFieldName("street");
customerAddressStreetRequiredFieldValidator.setDefaultMessage("Street is required");
customerAddressStreetRequiredFieldValidator.setShortCircuit(true);
customerAddressStreetRequiredFieldValidator.setValueStack(stack);
final RequiredStringValidator customerAddressStreetRequiredFieldValidator2 = new RequiredStringValidator();
customerAddressStreetRequiredFieldValidator2.setFieldName("street");
customerAddressStreetRequiredFieldValidator2.setDefaultMessage("Street is required 2");
customerAddressStreetRequiredFieldValidator2.setShortCircuit(true);
customerAddressStreetRequiredFieldValidator2.setValueStack(stack);
// customer -> Address -> pobox
final RequiredStringValidator customerAddressPoboxRequiredFieldValidator = new RequiredStringValidator();
customerAddressPoboxRequiredFieldValidator.setFieldName("pobox");
customerAddressPoboxRequiredFieldValidator.setDefaultMessage("PO Box is required");
customerAddressPoboxRequiredFieldValidator.setShortCircuit(false);
customerAddressPoboxRequiredFieldValidator.setValueStack(stack);
final RequiredStringValidator customerAddressPoboxRequiredFieldValidator2 = new RequiredStringValidator();
customerAddressPoboxRequiredFieldValidator2.setFieldName("pobox");
customerAddressPoboxRequiredFieldValidator2.setDefaultMessage("PO Box is required 2");
customerAddressPoboxRequiredFieldValidator2.setShortCircuit(false);
customerAddressPoboxRequiredFieldValidator2.setValueStack(stack);
final List<Validator> validatorsForMockAction = new ArrayList<Validator>() {
{