((Peer)channel).join(); ((Peer)channel2).join();
((DistributedChannel)channel).join(); ((DistributedChannel)channel2).join();
   public void testNonRecoverableDistributedChannel_4() throws Exception   {      if (channel.isRecoverable())      {         // we test only non-recoverable channels now         return;      }      if (!channel.acceptReliableMessages())      {         // we test channels that accept reliable messages         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();      // the channel has no receivers      assertFalse(channel.iterator().hasNext());      assertFalse(channel2.iterator().hasNext());      Message m = Factory.createMessage("message0", true, "payload");      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();      // non-transacted send, reliable message, one message      Delivery delivery = channel.handle(observer, m, null);      assertTrue(delivery.isDone());      List stored = channel.browse();      assertEquals(1, stored.size());      Message sm = (Message)stored.iterator().next();      assertTrue(sm.isReliable());      assertEquals("message0", sm.getMessageID());      stored = channel2.browse();      assertEquals(1, stored.size());      sm = (Message)stored.iterator().next();      assertTrue(sm.isReliable());      assertEquals("message0", sm.getMessageID());   }