public RuntimeOptionsBuilder parse(Class<?> clazz) {
        RuntimeOptionsBuilder args = new RuntimeOptionsBuilder();

        for (Class<?> classWithOptions = clazz; hasSuperClass(
            classWithOptions); classWithOptions = classWithOptions.getSuperclass()) {
            CucumberOptions options = requireNonNull(optionsProvider).getOptions(classWithOptions);

            if (options != null) {
                addDryRun(options, args);
                addMonochrome(options, args);
                addTags(classWithOptions, options, args);
                addPlugins(options, args);
                addPublish(options, args);
                addName(options, args);
                addSnippets(options, args);
                addGlue(options, args);
                addFeatures(options, args);
                addObjectFactory(options, args);
                addUuidGenerator(options, args);
            }
        }

        addDefaultFeaturePathIfNoFeaturePathIsSpecified(args, clazz);
        addDefaultGlueIfNoOverridingGlueIsSpecified(args, clazz);
        return args;
    }
@Test
    void throws_runtime_exception_on_invalid_inherited_tag() {
        RuntimeException actual = assertThrows(RuntimeException.class,
            () -> parser().parse(ClassWithInheredInvalidTagExpression.class).build());

        assertAll(
            () -> assertThat(actual.getMessage(), is(
                "Invalid tag expression at 'io.cucumber.core.options.CucumberOptionsAnnotationParserTest$ClassWithInvalidTagExpression'")),
            () -> assertThat(actual.getCause(), isA(TagExpressionException.class)));
    }