static <PojoT extends SdkPojo, BuilderT extends SdkBuilder<BuilderT, PojoT> & SdkPojo>
      AwsBuilderFactory<PojoT, BuilderT> builderFactory(Class<PojoT> clazz) {

    Generic pojoType = new ForLoadedType(clazz).asGenericType();
    MethodDescription builderMethod =
        pojoType.getDeclaredMethods().filter(named("builder").and(isStatic())).getOnly();
    Generic providerType =
        Generic.Builder.parameterizedType(FACTORY_TYPE, pojoType, builderMethod.getReturnType())
            .build();

    try {
      return (AwsBuilderFactory<PojoT, BuilderT>)
          BYTE_BUDDY
              .with(new ByteBuddyUtils.InjectPackageStrategy(clazz))
              .subclass(providerType)
              .method(named("get"))
              .intercept(MethodCall.invoke(builderMethod))
              .make()
              .load(ReflectHelpers.findClassLoader(), getClassLoadingStrategy(clazz))
              .getLoaded()
              .getDeclaredConstructor()
              .newInstance();
    } catch (ReflectiveOperationException e) {
      throw new RuntimeException("Unable to generate builder factory for " + clazz, e);
    }
  }
@Test
  public void generateBuilderFactory() {
    AwsBuilderFactory<SendMessageRequest, SendMessageRequest.Builder> factory =
        AwsSchemaUtils.builderFactory(SendMessageRequest.class);

    assertThat(factory.getClass().getPackage()).isEqualTo(SendMessageRequest.class.getPackage());
    assertThat(factory.get()).isInstanceOf(SendMessageRequest.Builder.class);
    assertThat(factory.sdkFields()).isEqualTo(SendMessageRequest.builder().sdkFields());
  }