((Peer)channel).join(); ((Peer)channel2).join();
((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join();
   public void testRecoverableDistributedChannel_16() throws Exception   {      if (!channel.isRecoverable())      {         // we test only recoverable channels now         return;      }      jchannel2.connect("testGroup");      // allow the group time to form      Thread.sleep(1000);      assertTrue(jchannel.isConnected());      assertTrue(jchannel2.isConnected());      // make sure both jchannels joined the group      assertEquals(2, jchannel.getView().getMembers().size());      assertEquals(2, jchannel2.getView().getMembers().size());      ((Peer)channel).join();      ((Peer)channel2).join();      // add an ACKING receiver to the remote channel peer      SimpleReceiver r = new SimpleReceiver("AckingReceiver", SimpleReceiver.ACKING);      assertTrue(channel2.add(r));      assertFalse(channel.iterator().hasNext());      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();      Message[] messages = new Message[NUMBER_OF_MESSAGES];      for(int i = 0; i < NUMBER_OF_MESSAGES; i++)      {         messages[i] = Factory.createMessage("message" + i, true, "payload" + i);         // non-transacted send, reliable message, multiple messages         Delivery delivery = channel.handle(observer, messages[i], null);         assertTrue(delivery.isDone());      }      assertTrue(channel.browse().isEmpty());      assertTrue(channel2.browse().isEmpty());      assertEqualSets(messages, r.getMessages());   }