final Mock mockHandler = new Mock( RequestHandler.class );
final Socket socket = new Socket();
final Long timeout = new Long( 23 );
mockHandler.expect( "handleConnection", C.args( C.eq( socket ) ) );
mockHandler.expect( "shutdown", C.args( C.eq( timeout ) ) );
final RequestHandler handler = (RequestHandler) mockHandler.proxy();
final DelegatingRequestHandler delegatingHandler =
new DelegatingRequestHandler( handler );
delegatingHandler.handleConnection( socket );
delegatingHandler.shutdown( 23 );