test_class.file: shardingsphere-infra/shardingsphere-infra-common/src/test/java/org/apache/shardingsphere/infra/spi/type/TypedSPIRegistryTest.java
test_class.identifier: TypedSPIRegistryTest
test_case.body: @Test(expected = ServiceProviderNotFoundException.class)
      public void assertGetRegisteredServiceWhenTypeIsNotExist() {
          String type = "TEST_FIXTURE";
          TypedSPIRegistry.getRegisteredService(TypedSPIFixture.class, type, new Properties());
      }
test_case.class_method_signature: TypedSPIRegistryTest.assertGetRegisteredServiceWhenTypeIsNotExist()
test_case.full_signature: @Test(expected = ServiceProviderNotFoundException.class) public void assertGetRegisteredServiceWhenTypeIsNotExist()
test_case.identifier: assertGetRegisteredServiceWhenTypeIsNotExist
test_case.invocations: getRegisteredService
test_case.modifiers: @Test(expected = ServiceProviderNotFoundException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertGetRegisteredServiceWhenTypeIsNotExist()
focal_class.file: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/spi/type/TypedSPIRegistry.java
focal_class.identifier: TypedSPIRegistry
focal_class.class_method_signature: TypedSPIRegistry.getRegisteredService(final Class<T> typedSPIClass, final String type, final Properties props)
focal_class.full_signature: public static T getRegisteredService(final Class<T> typedSPIClass, final String type, final Properties props)
focal_class.identifier: getRegisteredService
focal_class.modifiers: public static
focal_class.parameters: (final Class<T> typedSPIClass, final String type, final Properties props)
focal_class.return: T
focal_class.signature: T getRegisteredService(final Class<T> typedSPIClass, final String type, final Properties props)
focal_class.class_method_signature: TypedSPIRegistry.getRegisteredService(final Class<T> typedSPIClass)
focal_class.full_signature: public static T getRegisteredService(final Class<T> typedSPIClass)
focal_class.identifier: getRegisteredService
focal_class.modifiers: public static
focal_class.parameters: (final Class<T> typedSPIClass)
focal_class.return: T
focal_class.signature: T getRegisteredService(final Class<T> typedSPIClass)
focal_method.body: public static <T extends TypedSPI> T getRegisteredService(final Class<T> typedSPIClass, final String type, final Properties props) {
          Optional<T> serviceInstance = ShardingSphereServiceLoader.newServiceInstances(typedSPIClass).stream().filter(each -> type.equalsIgnoreCase(each.getType())).findFirst();
          if (serviceInstance.isPresent()) {
              T result = serviceInstance.get();
              result.setProps(props);
              return result;
          }
          throw new ServiceProviderNotFoundException(typedSPIClass, type);
      }
focal_method.class_method_signature: TypedSPIRegistry.getRegisteredService(final Class<T> typedSPIClass, final String type, final Properties props)
focal_method.full_signature: public static T getRegisteredService(final Class<T> typedSPIClass, final String type, final Properties props)
focal_method.identifier: getRegisteredService
focal_method.invocations: findFirst filter stream newServiceInstances equalsIgnoreCase getType isPresent get setProps
focal_method.modifiers: public static
focal_method.parameters: (final Class<T> typedSPIClass, final String type, final Properties props)
focal_method.return: T
focal_method.signature: T getRegisteredService(final Class<T> typedSPIClass, final String type, final Properties props)