@Test(expected = RequestHandlerDataException.class)
public void testBadRequestUriException() throws Exception {

    ChannelHandlerContext ctx = mock(ChannelHandlerContext.class);
    FullHttpRequest request = mock(FullHttpRequest.class);
    IObject message = new DSObject("{\"hello\": \"world\"}");
    when(request.method()).thenReturn(HttpMethod.GET);
    doThrow(new AddRequestParametersToIObjectException("exception")).when(requestParametersToIObject).extract(any(), any());
    HttpRequestHandler requestHandler = new HttpRequestHandler(ScopeProvider.getCurrentScope(), null, null, null, mock(IUpCounter.class));
    IOC.register(Keys.getOrAdd("HttpRequestParametersToIObjectException"), new SingletonStrategy(
                    new DSObject("{\"statusCode\": 200}")
            )
    );
    IObject environment = requestHandler.getEnvironment(ctx, request);
}