String absoluteUri = "http://0.0.0.0:80/test";
String host = "test.englishtown.com";
String badUrl = "http://test.englishtown.com/test?a=b=c|d=e";
HttpServerRequest request = mock(HttpServerRequest.class);
when(request.absoluteURI()).thenReturn(absoluteUri).thenThrow(new IllegalArgumentException());
when(request.uri()).thenReturn(badUrl);
when(request.headers()).thenReturn(headers);
when(headers.get(eq(HttpHeaders.HOST))).thenReturn(host);
jerseyHandler.init(options);
uri = jerseyHandler.getAbsoluteURI(request);