test_class.declarator: builder = new SpringCloudMetadataServiceURLBuilder()
test_class.modifier: private
test_class.original_string: private SpringCloudMetadataServiceURLBuilder builder = new SpringCloudMetadataServiceURLBuilder();
test_class.type: SpringCloudMetadataServiceURLBuilder
test_class.var_name: builder
test_class.file: dubbo-registry/dubbo-registry-api/src/test/java/org/apache/dubbo/registry/client/metadata/SpringCloudMetadataServiceURLBuilderTest.java
test_class.identifier: SpringCloudMetadataServiceURLBuilderTest
test_case.body: @Test
      public void testBuild() {
          List<URL> urls = builder.build(new DefaultServiceInstance("127.0.0.1", "test", 8080));
          assertEquals(0, urls.size());
  
          urls = builder.build(serviceInstance);
          assertEquals(1, urls.size());
          URL url = urls.get(0);
          assertEquals("192.168.0.102", url.getHost());
          assertEquals(20881, url.getPort());
          assertEquals("com.alibaba.cloud.dubbo.service.DubboMetadataService", url.getServiceInterface());
      }
test_case.class_method_signature: SpringCloudMetadataServiceURLBuilderTest.testBuild()
test_case.full_signature: @Test public void testBuild()
test_case.identifier: testBuild
test_case.invocations: build assertEquals size build assertEquals size get assertEquals getHost assertEquals getPort assertEquals getServiceInterface
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBuild()
focal_class.declarator: NAME = "spring-cloud"
focal_class.modifier: public static final
focal_class.original_string: public static final String NAME = "spring-cloud";
focal_class.type: String
focal_class.var_name: NAME
focal_class.file: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/metadata/SpringCloudMetadataServiceURLBuilder.java
focal_class.identifier: SpringCloudMetadataServiceURLBuilder
focal_class.interfaces: implements MetadataServiceURLBuilder
focal_class.class_method_signature: SpringCloudMetadataServiceURLBuilder.build(ServiceInstance serviceInstance)
focal_class.full_signature: @Override public List<URL> build(ServiceInstance serviceInstance)
focal_class.identifier: build
focal_class.modifiers: @Override public
focal_class.parameters: (ServiceInstance serviceInstance)
focal_class.return: List<URL>
focal_class.signature: List<URL> build(ServiceInstance serviceInstance)
focal_method.body: @Override
      public List<URL> build(ServiceInstance serviceInstance) {
          Map<String, String> metadata = serviceInstance.getMetadata();
          String dubboURLsJSON = metadata.get(METADATA_SERVICE_URLS_PROPERTY_NAME);
          if (StringUtils.isBlank(dubboURLsJSON)) {
              return Collections.emptyList();
          }
          List<String> urlStrings = JSON.parseArray(dubboURLsJSON, String.class);
          return urlStrings.stream().map(URL::valueOf).collect(Collectors.toList());
      }
focal_method.class_method_signature: SpringCloudMetadataServiceURLBuilder.build(ServiceInstance serviceInstance)
focal_method.full_signature: @Override public List<URL> build(ServiceInstance serviceInstance)
focal_method.identifier: build
focal_method.invocations: getMetadata get isBlank emptyList parseArray collect map stream toList
focal_method.modifiers: @Override public
focal_method.parameters: (ServiceInstance serviceInstance)
focal_method.return: List<URL>
focal_method.signature: List<URL> build(ServiceInstance serviceInstance)