@Test
public void shouldRequireNonOptionalParameter() throws IOException {

    FakeServletRequest request = new FakeServletRequest("GET", contextRoot, "/api", "/goodbye");
    expectedLogEvents.expect(ApiControllerAction.class, Level.DEBUG,
            "While processing ServletHttpExchange[GET " + contextRoot + "/api/goodbye] arguments to " +
            "ApiControllerMethodAction{GET /goodbye => ControllerWithTypedParameters.methodWithRequiredInt(int)}: " +
            new HttpRequestException("Missing required parameter amount"));
    servlet.service(request, response);
    assertThat(response.getStatus()).isEqualTo(400);
    assertThat(response.getStatusMessage()).isEqualTo("Missing required parameter amount");
}