* @throws Exception
*/
public void testCreateSubscriptionTable( )
throws Exception
{
SubscriptionTableManager mgr = SubscriptionTableManagerFactory.createSubscriptionTableManager( );
mgr.initialize( );
SubscriptionTable table = mgr.createSubscriptionTable( );
Subscription sub1 = createSubscription( 1 );
Subscription sub2 = createSubscription( 2 );
Subscription sub3 = createSubscription( 3 );
Subscription xsub4 = createExpiredSubscription( 4 );
Subscription xsub5 = createExpiredSubscription( 5 );
table.addSubscription( sub1 );
table.addSubscription( sub2 );
table.addSubscription( sub3 );
table.addSubscription( xsub4 );
table.addSubscription( xsub5 );
assertEquals( "3 subscriptions should have been left", 3,
table.getSubscribers( sub1.getResourceProps( ).getTopicExpression( ) ).length );
mgr.shutdown( );
return;
}