public static <T> Class<? extends Serializer<T>> loadOrGenObjectCodecClass(
      Class<T> cls, Fury fury) {
    Preconditions.checkNotNull(fury);
    BaseObjectCodecBuilder codecBuilder = new ObjectCodecBuilder(cls, fury);
    return loadOrGenCodecClass(cls, fury, codecBuilder);
  }
@SuppressWarnings("unchecked")
  @Test
  public void loadOrGenObjectCodecClass() throws Exception {
    Fury fury =
        Fury.builder()
            .withLanguage(Language.JAVA)
            .withRefTracking(false)
            .requireClassRegistration(false)
            .build();
    Class<?> seqCodecClass = fury.getClassResolver().getSerializerClass(BeanA.class);
    Generated.GeneratedSerializer serializer =
        seqCodecClass
            .asSubclass(Generated.GeneratedSerializer.class)
            .getConstructor(Fury.class, Class.class)
            .newInstance(fury, BeanA.class);
    MemoryBuffer buffer = MemoryUtils.buffer(32);
    BeanA beanA = BeanA.createBeanA(2);
    serializer.write(buffer, beanA);
    byte[] bytes = buffer.getBytes(0, buffer.writerIndex());
    Object obj = serializer.read(MemoryUtils.wrap(bytes));
    assertEquals(obj, beanA);
  }