Question 1
A shipping form requires an address and a postal code. Its Bean Validation 1.1 model is: class ShippingRequest { @NotNull Address address; } class Address { @NotNull String postalCode; } A test sets request.address to a new Address whose postalCode is null. The configured Validator returns an empty violation set from validator.validate(request). No custom validation groups or XML overrides are used. The form must still reject a null address as well as an address with a null postal code. The missing declaration is:
Show answer & explanation
Correct answer: B - Add @Valid to ShippingRequest.address, retaining its existing @NotNull annotation.