Channel channel = new DefaultLocalServerChannelFactory().newChannel( pipeline );
HttpRequest hr = new DefaultHttpRequest( HttpVersion.HTTP_1_1, HttpMethod.GET, "http://localhost/" );
MessageEvent e = new UpstreamMessageEvent(
channel, hr, new InetSocketAddress( 54321 ) );
ChannelHandlerContext ctx = RackUtil.buildDummyChannelHandlerContext( "localhost", "80" );
Request request = createMockBuilder( Request.class ).withConstructor( ctx, hr, Ruby.getGlobalRuntime() ).createMock();
Response response = new Response( request );
expect( rack.getRuntime() ).andReturn( Ruby.getGlobalRuntime() );
expect( rack.process( anyObject( Request.class ) ) ).andReturn( response );
replay( request );