}
@Test
public void testValidPayment() {
Order order = new Order();
BillingInfo info = new BillingInfo();
info.setPaymentId("INVALID");
info.setPaymentDesc("INVALID");
order.setBilling(info);
Errors errors = new BeanPropertyBindingResult(order, "validOrder");
orderValidator.validatePayment(info, errors);
assertEquals(2, errors.getAllErrors().size());
assertEquals("error.billing.type", errors.getFieldError("billing.paymentId").getCode());
assertEquals("error.billing.desc", errors.getFieldError("billing.paymentDesc").getCode());
info = new BillingInfo();
info.setPaymentId("VISA");
info.setPaymentDesc("ADFI-1234567890");
order.setBilling(info);
errors = new BeanPropertyBindingResult(order, "validOrder");
orderValidator.validatePayment(info, errors);