### Question:
ThriftUtils { public static String generateMethodArgsClassName(String serviceName, String methodName) { int index = serviceName.lastIndexOf("."); if (index > 0) { return new StringBuilder(32) .append(serviceName.substring(0, index + 1)) .append("$__") .append(serviceName.substring(index + 1)) .append("Stub$") .append(methodName) .append("_args") .toString(); } else { return new StringBuffer(32) .append("$__") .append(serviceName) .append("Stub$") .append(methodName) .append("_args") .toString(); } }  static String generateMethodArgsClassName(String serviceName, String methodName); static String generateMethodResultClassName(String serviceName, String method); static String generateSetMethodName(String fieldName); static String generateGetMethodName(String fieldName); static String generateMethodArgsClassNameThrift(String serviceName, String methodName); static String generateMethodResultClassNameThrift(String serviceName, String methodName);  }### Answer:
@Test public void testGenerateMethodArgsClassName() { Assertions.assertEquals( $__DemoStub.echoString_args.class.getName(), ThriftUtils.generateMethodArgsClassName( org.apache.dubbo.rpc.gen.dubbo.Demo.class.getName(), "echoString")); Assertions.assertEquals( $__DemoStub.echoString_args.class.getName(), ExtensionLoader.getExtensionLoader(ClassNameGenerator.class) .getExtension(DubboClassNameGenerator.NAME).generateArgsClassName( org.apache.dubbo.rpc.gen.dubbo.Demo.class.getName(), "echoString")); }
@Test public void testGenerateMethodArgsClassName() { Assert.assertEquals( $__DemoStub.echoString_args.class.getName(), ThriftUtils.generateMethodArgsClassName( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class.getName(), "echoString")); Assert.assertEquals( $__DemoStub.echoString_args.class.getName(), ExtensionLoader.getExtensionLoader(ClassNameGenerator.class) .getExtension(DubboClassNameGenerator.NAME).generateArgsClassName( com.alibaba.dubbo.rpc.gen.dubbo.Demo.class.getName(), "echoString")); }