_httpResponse = createMock( HttpResponse.class );
_writer = new MockDefaultResponseWriter();
_writer.setResponse( _httpResponse );
_httpRequest = new DefaultHttpRequest( HttpVersion.HTTP_1_1, HttpMethod.GET, "http://localhost/" );
_rack = createMock( RackProxy.class );
ChannelHandler handler = new RackChannelUpstreamHandler( _rack );
ChannelPipeline pipeline = Channels.pipeline();
pipeline.addLast( "handler", handler );
new DefaultLocalServerChannelFactory().newChannel( pipeline );
_context = pipeline.getContext( handler );
_request = new Request( _context, _httpRequest, Ruby.getGlobalRuntime() );