PagingFilteredQueue queue2 = new PagingFilteredQueue("queue2", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);
PagingFilteredQueue queue2 = new PagingFilteredQueue("queue2", channelIdManager.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);
   protected void routeWithFilter(boolean persistentMessage) throws Throwable   {      PostOffice postOffice = null;            try      {               postOffice = createPostOffice();                  SimpleFilter filter = new SimpleFilter(2);               PagingFilteredQueue queue1 = new PagingFilteredQueue("queue1", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), filter);                           Binding binding1 =            postOffice.bindQueue("topic1", queue1);                  PagingFilteredQueue queue2 = new PagingFilteredQueue("queue2", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);                           Binding binding2 =            postOffice.bindQueue("topic1", queue2);                  PagingFilteredQueue queue3 = new PagingFilteredQueue("queue3", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);                           Binding binding3 =            postOffice.bindQueue("topic1", queue3);                     SimpleReceiver receiver1 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);         queue1.add(receiver1);         SimpleReceiver receiver2 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);         queue2.add(receiver2);         SimpleReceiver receiver3 = new SimpleReceiver("blah", SimpleReceiver.ACCEPTING);         queue3.add(receiver3);                  Message msg1 = CoreMessageFactory.createCoreMessage(1);               MessageReference ref1 = ms.reference(msg1);                  boolean routed = postOffice.route(ref1, "topic1", null);               assertTrue(routed);         Message msg2 = CoreMessageFactory.createCoreMessage(2);               MessageReference ref2 = ms.reference(msg2);                  routed = postOffice.route(ref2, "topic1", null);               assertTrue(routed);         Message msg3 = CoreMessageFactory.createCoreMessage(3);               MessageReference ref3 = ms.reference(msg3);                  routed = postOffice.route(ref3, "topic1", null);               assertTrue(routed);                  List msgs = receiver1.getMessages();         assertNotNull(msgs);         assertEquals(1, msgs.size());         Message msgRec = (Message)msgs.get(0);         assertTrue(msg2 == msgRec);         receiver1.acknowledge(msgRec, null);         msgs = queue1.browse();         assertNotNull(msgs);         assertTrue(msgs.isEmpty());                    msgs = receiver2.getMessages();         assertNotNull(msgs);         assertEquals(3, msgs.size());         Message msgRec1 = (Message)msgs.get(0);         assertTrue(msg1 == msgRec1);         Message msgRec2 = (Message)msgs.get(1);         assertTrue(msg2 == msgRec2);         Message msgRec3 = (Message)msgs.get(2);         assertTrue(msg3 == msgRec3);                   receiver2.acknowledge(msgRec1, null);         receiver2.acknowledge(msgRec2, null);         receiver2.acknowledge(msgRec3, null);         msgs = queue2.browse();         assertNotNull(msgs);         assertTrue(msgs.isEmpty());                    msgs = receiver3.getMessages();         assertNotNull(msgs);         assertEquals(3, msgs.size());         msgRec1 = (Message)msgs.get(0);         assertTrue(msg1 == msgRec1);         msgRec2 = (Message)msgs.get(1);         assertTrue(msg2 == msgRec2);         msgRec3 = (Message)msgs.get(2);         assertTrue(msg3 == msgRec3);                   receiver3.acknowledge(msgRec1, null);         receiver3.acknowledge(msgRec2, null);         receiver3.acknowledge(msgRec3, null);         msgs = queue3.browse();         assertNotNull(msgs);         assertTrue(msgs.isEmpty());                }      finally      {         if (postOffice != null)         {            postOffice.stop();         }                  checkNoMessageData();         checkNoBindingData();      }   }