@Test
public void testHandleMissingRequestParameter() {

    MockHttpServletRequest req = new MockHttpServletRequest();
    String requestUri = "/foo";
    String queryString = "bar=1";
    req.setRequestURI(requestUri);
    req.setQueryString(queryString);
    MissingAnyOfOptionalServletRequestParametersException e = new MissingAnyOfOptionalServletRequestParametersException(
            "dog", "cat");
    ResponseEntity<BadRequest> result = this.restController.handleMissingRequestParameter(e, req);
    assertEquals(HttpStatus.BAD_REQUEST, result.getStatusCode());
    assertEquals(String.format("%s?%s", requestUri, queryString), result.getBody().getRequestUri());
    assertEquals(e.getMessage(), result.getBody().getMessage());
}