test_class.declarator: url = Mockito.mock(URL.class)
test_class.modifier: private
test_class.original_string: private URL url = Mockito.mock(URL.class);
test_class.type: URL
test_class.var_name: url
test_class.declarator: invoker = mock(Invoker.class)
test_class.modifier: private
test_class.original_string: private Invoker invoker = mock(Invoker.class);
test_class.type: Invoker
test_class.var_name: invoker
test_class.declarator: protocol = mock(Protocol.class)
test_class.modifier: private
test_class.original_string: private Protocol protocol = mock(Protocol.class);
test_class.type: Protocol
test_class.var_name: protocol
test_class.declarator: wrapper = new QosProtocolWrapper(protocol)
test_class.modifier: private
test_class.original_string: private QosProtocolWrapper wrapper = new QosProtocolWrapper(protocol);
test_class.type: QosProtocolWrapper
test_class.var_name: wrapper
test_class.declarator: server = Server.getInstance()
test_class.modifier: private
test_class.original_string: private Server server = Server.getInstance();
test_class.type: Server
test_class.var_name: server
test_class.file: dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/protocol/QosProtocolWrapperTest.java
test_class.identifier: QosProtocolWrapperTest
test_case.body: @Test
      public void testRefer() throws Exception {
          wrapper.refer(BaseCommand.class, url);
          assertThat(server.isStarted(), is(true));
          assertThat(server.getHost(), is("localhost"));
          assertThat(server.getPort(), is(12345));
          assertThat(server.isAcceptForeignIp(), is(false));
          verify(protocol).refer(BaseCommand.class, url);
      }
test_case.class_method_signature: QosProtocolWrapperTest.testRefer()
test_case.full_signature: @Test public void testRefer()
test_case.identifier: testRefer
test_case.invocations: refer assertThat isStarted is assertThat getHost is assertThat getPort is assertThat isAcceptForeignIp is refer verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRefer()
focal_class.declarator: logger = LoggerFactory.getLogger(QosProtocolWrapper.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(QosProtocolWrapper.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: hasStarted = new AtomicBoolean(false)
focal_class.modifier: private static
focal_class.original_string: private static AtomicBoolean hasStarted = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: hasStarted
focal_class.declarator: protocol
focal_class.modifier: private
focal_class.original_string: private Protocol protocol;
focal_class.type: Protocol
focal_class.var_name: protocol
focal_class.file: dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/protocol/QosProtocolWrapper.java
focal_class.identifier: QosProtocolWrapper
focal_class.interfaces: implements Protocol
focal_class.class_method_signature: QosProtocolWrapper.QosProtocolWrapper(Protocol protocol)
focal_class.full_signature: public  QosProtocolWrapper(Protocol protocol)
focal_class.identifier: QosProtocolWrapper
focal_class.modifiers: public
focal_class.parameters: (Protocol protocol)
focal_class.signature:  QosProtocolWrapper(Protocol protocol)
focal_class.class_method_signature: QosProtocolWrapper.getDefaultPort()
focal_class.full_signature: @Override public int getDefaultPort()
focal_class.identifier: getDefaultPort
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getDefaultPort()
focal_class.class_method_signature: QosProtocolWrapper.export(Invoker<T> invoker)
focal_class.full_signature: @Override public Exporter<T> export(Invoker<T> invoker)
focal_class.identifier: export
focal_class.modifiers: @Override public
focal_class.parameters: (Invoker<T> invoker)
focal_class.return: Exporter<T>
focal_class.signature: Exporter<T> export(Invoker<T> invoker)
focal_class.class_method_signature: QosProtocolWrapper.refer(Class<T> type, URL url)
focal_class.full_signature: @Override public Invoker<T> refer(Class<T> type, URL url)
focal_class.identifier: refer
focal_class.modifiers: @Override public
focal_class.parameters: (Class<T> type, URL url)
focal_class.return: Invoker<T>
focal_class.signature: Invoker<T> refer(Class<T> type, URL url)
focal_class.class_method_signature: QosProtocolWrapper.destroy()
focal_class.full_signature: @Override public void destroy()
focal_class.identifier: destroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroy()
focal_class.class_method_signature: QosProtocolWrapper.getServers()
focal_class.full_signature: @Override public List<ProtocolServer> getServers()
focal_class.identifier: getServers
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<ProtocolServer>
focal_class.signature: List<ProtocolServer> getServers()
focal_class.class_method_signature: QosProtocolWrapper.startQosServer(URL url)
focal_class.full_signature: private void startQosServer(URL url)
focal_class.identifier: startQosServer
focal_class.modifiers: private
focal_class.parameters: (URL url)
focal_class.return: void
focal_class.signature: void startQosServer(URL url)
focal_class.class_method_signature: QosProtocolWrapper.stopServer()
focal_class.full_signature:  void stopServer()
focal_class.identifier: stopServer
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stopServer()
focal_method.body: @Override
      public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
          if (UrlUtils.isRegistry(url)) {
              startQosServer(url);
              return protocol.refer(type, url);
          }
          return protocol.refer(type, url);
      }
focal_method.class_method_signature: QosProtocolWrapper.refer(Class<T> type, URL url)
focal_method.full_signature: @Override public Invoker<T> refer(Class<T> type, URL url)
focal_method.identifier: refer
focal_method.invocations: isRegistry startQosServer refer refer
focal_method.modifiers: @Override public
focal_method.parameters: (Class<T> type, URL url)
focal_method.return: Invoker<T>
focal_method.signature: Invoker<T> refer(Class<T> type, URL url)