@Test
public void shouldGive400OnInvalidUuidConversion() throws IOException {

    FakeServletRequest request = new FakeServletRequest("POST", contextRoot, "/api", "/withUuid");
    request.setParameter("uuid", "Not an uuid");
    expectedLogEvents.expect(ApiControllerAction.class, Level.DEBUG,
            "While processing ServletHttpExchange[POST " + contextRoot + "/api/withUuid?uuid=Not+an+uuid]" +
            " arguments to ApiControllerMethodAction{POST /withUuid => ControllerWithTypedParameters.methodWithUuid(UUID)}: " +
            new HttpRequestException("Could not convert uuid=Not an uuid to java.util.UUID"));
    servlet.service(request, response);
    assertThat(response.getStatus()).isEqualTo(400);
    assertThat(response.getStatusMessage()).contains("Could not convert uuid=Not an uuid to java.util.UUID");
}