title: How to write Unit Test for below Exception Handler method using mockito?
body: <pre><code>@ExceptionHandler({ ConstraintViolationException.class })
  public ResponseEntity&lt;Object&gt; handleConstraintViolation(ConstraintViolationException ex, WebRequest request) {
      StringBuilder messageBuilder = new StringBuilder("Validation failed for: ");
      ex.getConstraintViolations()
          .stream()
          .forEach(v -&gt; messageBuilder
              .append("property: [" + v.getPropertyPath() + "], value: [" + v.getInvalidValue() + "], constraint: [" + v.getMessage() + "]"));
      return new ResponseEntity&lt;&gt;(responseBuilder
          .createErrorResponse(INVALID_PARAMETER,
              messageBuilder.toString()), getHeaders(), BAD_REQUEST);
  }
  </code></pre>
  
  <p>I want to test this @ControllerAdvice method</p>