ObjectFactory loadObjectFactory() {
        Class<? extends ObjectFactory> objectFactoryClass = options.getObjectFactoryClass();
        ClassLoader classLoader = classLoaderSupplier.get();
        ServiceLoader<ObjectFactory> loader = ServiceLoader.load(ObjectFactory.class, classLoader);
        if (objectFactoryClass == null) {
            return loadSingleObjectFactoryOrDefault(loader);
        }

        return loadSelectedObjectFactory(loader, objectFactoryClass);
    }
@Test
    void test_case_5() {
        io.cucumber.core.backend.Options options = () -> DefaultObjectFactory.class;
        ObjectFactoryServiceLoader loader = new ObjectFactoryServiceLoader(
            () -> new ServiceLoaderTestClassLoader(ObjectFactory.class,
                DefaultObjectFactory.class,
                OtherFactory.class),
            options);
        assertThat(loader.loadObjectFactory(), instanceOf(DefaultObjectFactory.class));
    }