@Test
public void shouldExtractRightCookie() throws Exception {

    GetQueryParameterRule rule = new GetQueryParameterRule();
    FullHttpRequest request = mock(FullHttpRequest.class);
    String uri = "/?key1=val1&key2=val2";
    when(request.getUri()).thenReturn(uri);
    assertEquals("val2", rule.resolve(request, "key2"));
}