@VisibleForTesting
    static void verifyClassAnnotation(Class<?> optionsClass) throws Exception {
        final ClassReader classReader = new ClassReader(optionsClass.getName());
        List<String> annotationDescriptors = new ArrayList<>();
        classReader.accept(
                new ClassVisitor(Opcodes.ASM9) {
                    @Override
                    public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
                        annotationDescriptors.add(descriptor);
                        return super.visitAnnotation(descriptor, visible);
                    }
                },
                0);
        if (!annotationDescriptors.contains(Type.getDescriptor(Public.class))
                && !annotationDescriptors.contains(Type.getDescriptor(PublicEvolving.class))
                && !annotationDescriptors.contains(Type.getDescriptor(Experimental.class))) {
            throw new RuntimeException(
                    String.format(
                            "The ConfigOption class %s must be annotated with Public, PublicEvolving, or Experimental.",
                            optionsClass.getName()));
        }
    }
@Test
    void testVerifyClassAnnotation() {
        assertThatNoException()
                .isThrownBy(
                        () -> ConfigOptionsDocGenerator.verifyClassAnnotation(PublicOptions.class));
        assertThatNoException()
                .isThrownBy(
                        () ->
                                ConfigOptionsDocGenerator.verifyClassAnnotation(
                                        PublicEvolvingOptions.class));
        assertThatNoException()
                .isThrownBy(
                        () ->
                                ConfigOptionsDocGenerator.verifyClassAnnotation(
                                        ExperimentalOptions.class));
        assertThatException()
                .isThrownBy(
                        () ->
                                ConfigOptionsDocGenerator.verifyClassAnnotation(
                                        OptionsWithoutAnnotation.class));
        assertThatException()
                .isThrownBy(
                        () ->
                                ConfigOptionsDocGenerator.verifyClassAnnotation(
                                        InternalOptions.class));
    }