((Peer)channel).join(); ((Peer)channel2).join();
((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join();
   public void testRecoverableDistributedChannel_21() 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());      Message m = Factory.createMessage("message0", false, "payload");      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();      Transaction tx = tr.createTransaction();      // transacted send, non-reliable message, one message      // for a transactional send, handle() return value is unspecified      channel.handle(observer, m, tx);      // no messages in the channel      assertEquals(0, channel.browse().size());      assertEquals(0, channel2.browse().size());      // no message at the receiver      assertTrue(r.getMessages().isEmpty());      tx.rollback();      // no messages in the channel      assertEquals(0, channel.browse().size());      assertEquals(0, channel2.browse().size());      // no message at the receiver      assertTrue(r.getMessages().isEmpty());   }