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 cannot_create_with_glue_and_extra_glue() {
        Executable testMethod = () -> parser().parse(ClassWithGlueAndExtraGlue.class).build();
        CucumberException actualThrown = assertThrows(CucumberException.class, testMethod);
        assertThat("Unexpected exception message", actualThrown.getMessage(),
            is(equalTo("glue and extraGlue cannot be specified at the same time")));
    }