ServerBusListener extends AbstractFeature { public void busRegistered( Bus bus ) { LOG.info( "Adding LoggingFeature interceptor on bus: " + bus.getId() ); bus.setProperty( "bus.io.CachedOutputStream.Threshold", "500000" ); System.setProperty( "org.apache.cxf.io.CachedOutputStream.Threshold", "500000" ); LOG.info( "Setting CXF CachedOutputStream.Threshold size to: 500Kb " ); bus.setProperty( AsyncHTTPConduit.USE_ASYNC, Boolean.TRUE ); bus.getInInterceptors().add( new AccessControlInterceptor( identityManager ) ); bus.getOutInterceptors().add( new ClientOutInterceptor( securityManager, peerManager ) ); bus.getOutInterceptors().add( new ClientHeaderInterceptor( peerManager ) ); bus.getInInterceptors().add( new ServerInInterceptor( securityManager, peerManager ) ); bus.getOutInterceptors().add( new ServerOutInterceptor( securityManager, peerManager ) ); bus.getInInterceptors().add( new ClientInInterceptor( securityManager, peerManager ) ); LOG.info( "Successfully added LoggingFeature interceptor on bus: " + bus.getId() ); } ServerBusListener( final SecurityManager securityManager, final IdentityManager identityManager,
                              final PeerManager peerManager ); void busRegistered( Bus bus );  }
@Test public void testBusRegistered() throws Exception { serverBusListener.busRegistered( bus ); verify( inInterceptors ).add( isA( AccessControlInterceptor.class ) ); verify( outInterceptors ).add( isA( ClientOutInterceptor.class ) ); }