@Test
public void testGeneralParamException() throws ExecutionException, InterruptedException {
initiateWebApplication(ParamExceptionMapperResource.class,
ParamExceptionMapper.class);
ContainerResponse responseContext = getResponseContext(UriBuilder.fromPath("/").path("path/ 123").build().toString());
assertEquals("param", responseContext.getEntity());
responseContext = getResponseContext(UriBuilder.fromPath("/").path("matrix;x= 123").build().toString());
assertEquals("param", responseContext.getEntity());
responseContext = getResponseContext(UriBuilder.fromPath("/").path("query").queryParam("x", " 123").build().toString());
assertEquals("param", responseContext.getEntity());
responseContext = getResponseContext(UriBuilder.fromPath("/").path("cookie").build().toString(), new Cookie("x", " 123"));
assertEquals("param", responseContext.getEntity());
responseContext = apply(
RequestContextBuilder.from("/header", "GET").
header("x", " 123").
build()
);
assertEquals("param", responseContext.getEntity());
Form f = new Form();
f.param("x", " 123");
responseContext = apply(
RequestContextBuilder.from("/form", "POST").
type(MediaType.APPLICATION_FORM_URLENCODED_TYPE).
entity(f).
build()
);
assertEquals("param", responseContext.getEntity());
}