Code example for BasicHttpRequest

0
    public void testLookup() throws Exception { 
        final UriPatternMatcher<HttpAsyncRequestHandler<?>> matcher = Mockito.spy(
                new UriPatternMatcher<HttpAsyncRequestHandler<?>>());
        final UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper(matcher);
 
        final HttpRequest request = new BasicHttpRequest("GET", "/");
        registry.lookup(request);
        registry.unregister("/h1");
 
        Mockito.verify(matcher).lookup("/"); 
    } 
 
    @Test(expected=IllegalArgumentException.class) 
    public void testRegisterNull() throws Exception { 
        final UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();
        registry.register(null, null);
    } 
 
    @Test(expected=IllegalArgumentException.class) 
    public void testLookupNull() throws Exception { 
        final UriHttpAsyncRequestHandlerMapper registry = new UriHttpAsyncRequestHandlerMapper();