Validation Testing
Learn Validation Testing (Spring MVC Testing, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes Validation testing sends valid and invalid input and asserts that Bean Validation ( @Valid , @NotBlank , @Size ) rejects bad data with HTTP 400. Constraint annotations on a DTO are checked when the controller parameter has @Valid or @Validated . Failure type : a bad @RequestBody throws MethodArgumentNotValidException , which Spring maps to 400 by default.