test_class.file: dubbo-remoting/dubbo-remoting-p2p/src/test/java/org/apache/dubbo/remoting/p2p/support/MulticastNetworkerTest.java
test_class.identifier: MulticastNetworkerTest
test_case.body: @Test
      public void testJoin() throws RemotingException, InterruptedException {
          final String groupURL = "multicast://224.5.6.7:1234";
          final String peerURL = "exchange://0.0.0.0:" + NetUtils.getAvailablePort() + "?exchanger=header";
  
          final CountDownLatch countDownLatch = new CountDownLatch(1);
          Peer peer1 = Networkers.join(groupURL, peerURL, new ChannelHandlerAdapter() {
              @Override
              public void received(Channel channel, Object message) {
                  countDownLatch.countDown();
              }
          });
          Peer peer2 = Networkers.join(groupURL, "exchange://0.0.0.0:" + NetUtils.getAvailablePort() + "?exchanger=header",
                  mock(ChannelHandlerAdapter.class));
  
          while (true) {
              long count = countDownLatch.getCount();
              if (count > 0) {
                  break;
              }
              for (Channel channel : peer1.getChannels()) {
                  channel.send("hello world!");
              }
              TimeUnit.MILLISECONDS.sleep(50);
          }
  
          Group lookup = Networkers.lookup(groupURL);
          assertThat(lookup, not(nullValue()));
  
          peer2.close();
          peer1.close();
      }
test_case.class_method_signature: MulticastNetworkerTest.testJoin()
test_case.full_signature: @Test public void testJoin()
test_case.identifier: testJoin
test_case.invocations: getAvailablePort join countDown join getAvailablePort mock getCount getChannels send sleep lookup assertThat not nullValue close close
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJoin()
focal_class.file: dubbo-remoting/dubbo-remoting-p2p/src/main/java/org/apache/dubbo/remoting/p2p/support/MulticastNetworker.java
focal_class.identifier: MulticastNetworker
focal_class.interfaces: implements Networker
focal_class.class_method_signature: MulticastNetworker.lookup(URL url)
focal_class.full_signature: @Override public Group lookup(URL url)
focal_class.identifier: lookup
focal_class.modifiers: @Override public
focal_class.parameters: (URL url)
focal_class.return: Group
focal_class.signature: Group lookup(URL url)
focal_method.body: @Override
      public Group lookup(URL url) throws RemotingException {
          return new MulticastGroup(url);
      }
focal_method.class_method_signature: MulticastNetworker.lookup(URL url)
focal_method.full_signature: @Override public Group lookup(URL url)
focal_method.identifier: lookup
focal_method.modifiers: @Override public
focal_method.parameters: (URL url)
focal_method.return: Group
focal_method.signature: Group lookup(URL url)