MockControl listenerControl = MockControl.createStrictControl( IoServiceListener.class );
IoServiceListener listener = ( IoServiceListener ) listenerControl.getMock();
// Creating a session should activate a service automatically.
listener.serviceActivated( connector, ADDRESS, null, null );
listener.sessionCreated( session );
chain.fireSessionCreated( session );
chain.fireSessionOpened( session );
listenerControl.replay();
chainControl.replay();