PagingFilteredQueue queue2 = new PagingFilteredQueue("nonDurableQueue", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);
PagingFilteredQueue queue2 = new PagingFilteredQueue("nonDurableQueue", channelIdManager.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);
   public final void testBind() throws Throwable   {      PostOffice office1 = null;            PostOffice office2 = null;            PostOffice office3 = null;            try      {                      office1 = createPostOffice();                  //Bind one durable                  Filter filter1 = new Selector("x = 'cheese'");         Filter filter2 = new Selector("y = 'bread'");                  PagingFilteredQueue queue1 = new PagingFilteredQueue("durableQueue", im.getId(), ms, pm, true, true, (QueuedExecutor)pool.get(), null);                           Binding binding1 =            office1.bindQueue("condition1", queue1);                  //Binding twice with the same name should fail               try         {            Binding bindFail = office1.bindQueue("condition1", queue1);            fail();         }         catch (IllegalArgumentException e)         {            //Ok         }                        //Bind one non durable         PagingFilteredQueue queue2 = new PagingFilteredQueue("nonDurableQueue", im.getId(), ms, pm, true, false, (QueuedExecutor)pool.get(), null);                  Binding binding2 =            office1.bindQueue("condition2", queue2);                  //Check they're there                  Binding binding3 = office1.getBindingForQueueName("durableQueue");         assertNotNull(binding3);         assertTrue(binding1 == binding3);         assertEquivalent(binding1, binding3);         assertTrue(binding3.getQueue().isActive());         assertEquals(true, binding3.getQueue().isRecoverable());                           Binding binding4 = office1.getBindingForQueueName("nonDurableQueue");         assertNotNull(binding4);         assertTrue(binding2 == binding4);         assertEquivalent(binding2, binding4);         assertTrue(binding4.getQueue().isActive());         assertEquals(false, binding4.getQueue().isRecoverable());                  office1.stop();                  //Throw away the office and create another         office2 = createPostOffice();                  //Only one binding should be there         Binding binding5 = office2.getBindingForQueueName("durableQueue");         assertNotNull(binding5);         assertEquivalent(binding1, binding5);         //Should be inactive         assertFalse(binding5.getQueue().isActive());                  Binding binding6 = office2.getBindingForQueueName("nonDurableQueue");         assertNull(binding6);                  //Unbind the binding         Binding binding7 = office2.unbindQueue("durableQueue");         assertNotNull(binding7);         assertEquivalent(binding1, binding7);                  //Make sure no longer there         Binding binding8 = office2.getBindingForQueueName("durableQueue");         assertNull(binding8);                  office2.stop();                  //Throw away office and start another         office3 = createPostOffice();                  //Make sure not there         Binding binding9 = office3.getBindingForQueueName("durableQueue");         assertNull(binding9);                        }      finally      {         if (office1 != null)         {            office1.stop();         }                  if (office2 != null)         {            office2.stop();         }                  if (office3 != null)         {            office2.stop();         }                  checkNoBindingData();      }               }