new IoFilterMapping( "second", ( IoFilter ) MockControl
.createControl( IoFilter.class ).getMock() ),
new IoFilterMapping( "third", ( IoFilter ) MockControl
.createControl( IoFilter.class ).getMock() ) };
IoService ioSessionManager = ( IoService ) mockIoService
.getMock();
DefaultIoFilterChainBuilder ioFilterChainBuilder = ( DefaultIoFilterChainBuilder ) mockIoFilterChainBuilder
.getMock();
/*
* Record expectations.
*/
ioFilterChainBuilder.addLast( "first", mappings[ 0 ].getFilter() );
ioFilterChainBuilder.addLast( "second", mappings[ 1 ].getFilter() );
ioFilterChainBuilder.addLast( "third", mappings[ 2 ].getFilter() );
ioSessionManager.getFilterChain();
mockIoService.setReturnValue( mockIoFilterChainBuilder.getMock() );
/*
* Replay.
*/