}
@Test
public void shouldValidateMethodWithTwoConstraints()
throws Exception {
MethodInfo info = new DefaultMethodInfo();
info.setParameters(new Object[] { null, new Customer(null, null) });
info.setResourceMethod(withTwoConstraints);
interceptor = new MethodValidatorInterceptor(l10n, interpolator, validator, info, factory.getValidator(), provider);
when(l10n.getLocale()).thenReturn(new Locale("pt", "br"));
MyController controller = new MyController();
interceptor.intercept(stack, info.getResourceMethod(), controller);
String messages = validator.getErrors().toString();
assertThat(validator.getErrors(), hasSize(3));
assertThat(messages, containsString("não pode ser nulo"));