*/
public void testDifferingSubscriptionTypesShareCommonIdNumberingSequence() throws Exception
{
//create a No-Ack subscription, get the first Subscription ID
long previousId = 0;
Subscription noAckSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, _session, new AMQShortString("1"), false, null, false, _channel.getCreditManager());
previousId = noAckSub.getSubscriptionID();
//create an ack subscription, verify the next Subscription ID is used
Subscription ackSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, _session, new AMQShortString("1"), true, null, false, _channel.getCreditManager());
assertEquals("Unexpected Subscription ID allocated", previousId + 1, ackSub.getSubscriptionID());
previousId = ackSub.getSubscriptionID();
//create a browser subscription
FieldTable filters = new FieldTable();
filters.put(AMQPFilterTypes.NO_CONSUME.getValue(), true);
Subscription browerSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, _session, new AMQShortString("1"), true, null, false, _channel.getCreditManager());
assertEquals("Unexpected Subscription ID allocated", previousId + 1, browerSub.getSubscriptionID());
previousId = browerSub.getSubscriptionID();
//create an BasicGet NoAck subscription
Subscription getNoAckSub = SubscriptionFactoryImpl.INSTANCE.createBasicGetNoAckSubscription(_channel, _session, new AMQShortString("1"), null, false,
_channel.getCreditManager(),_channel.getClientDeliveryMethod(), _channel.getRecordDeliveryMethod());
assertEquals("Unexpected Subscription ID allocated", previousId + 1, getNoAckSub.getSubscriptionID());
previousId = getNoAckSub.getSubscriptionID();
}