test_class.declarator: count = new CurrentTelnetHandler()
test_class.modifier: private static
test_class.original_string: private static TelnetHandler count = new CurrentTelnetHandler();
test_class.type: TelnetHandler
test_class.var_name: count
test_class.declarator: mockChannel
test_class.modifier: private
test_class.original_string: private Channel mockChannel;
test_class.type: Channel
test_class.var_name: mockChannel
test_class.file: dubbo-plugin/dubbo-qos/src/test/java/org/apache/dubbo/qos/legacy/CurrentTelnetHandlerTest.java
test_class.identifier: CurrentTelnetHandlerTest
test_case.body: @Test
      public void testService() throws RemotingException {
          mockChannel = mock(Channel.class);
          given(mockChannel.getAttribute("telnet.service")).willReturn("org.apache.dubbo.rpc.protocol.dubbo.support.DemoService");
  
          String result = count.telnet(mockChannel, "");
          assertEquals("org.apache.dubbo.rpc.protocol.dubbo.support.DemoService", result);
      }
test_case.class_method_signature: CurrentTelnetHandlerTest.testService()
test_case.full_signature: @Test public void testService()
test_case.identifier: testService
test_case.invocations: mock willReturn given getAttribute telnet assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testService()
focal_class.file: dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/legacy/CurrentTelnetHandler.java
focal_class.identifier: CurrentTelnetHandler
focal_class.interfaces: implements TelnetHandler
focal_class.class_method_signature: CurrentTelnetHandler.telnet(Channel channel, String message)
focal_class.full_signature: @Override public String telnet(Channel channel, String message)
focal_class.identifier: telnet
focal_class.modifiers: @Override public
focal_class.parameters: (Channel channel, String message)
focal_class.return: String
focal_class.signature: String telnet(Channel channel, String message)
focal_method.body: @Override
      public String telnet(Channel channel, String message) {
          if (message.length() > 0) {
              return "Unsupported parameter " + message + " for pwd.";
          }
          String service = (String) channel.getAttribute(ChangeTelnetHandler.SERVICE_KEY);
          StringBuilder buf = new StringBuilder();
          if (service == null || service.length() == 0) {
              buf.append("/");
          } else {
              buf.append(service);
          }
          return buf.toString();
      }
focal_method.class_method_signature: CurrentTelnetHandler.telnet(Channel channel, String message)
focal_method.full_signature: @Override public String telnet(Channel channel, String message)
focal_method.identifier: telnet
focal_method.invocations: length getAttribute length append append toString
focal_method.modifiers: @Override public
focal_method.parameters: (Channel channel, String message)
focal_method.return: String
focal_method.signature: String telnet(Channel channel, String message)