public void runPickle(Pickle pickle) {
        try {
            StepTypeRegistry stepTypeRegistry = createTypeRegistryForPickle(pickle);
            snippetGenerators = createSnippetGeneratorsForPickle(stepTypeRegistry);

            // Java8 step definitions will be added to the glue here
            buildBackendWorlds();

            glue.prepareGlue(stepTypeRegistry);

            TestCase testCase = createTestCaseForPickle(pickle);
            testCase.run(bus);
        } finally {
            glue.removeScenarioScopedGlue();
            disposeBackendWorlds();
        }
    }
@Test
    void scenario_hooks_not_executed_for_empty_pickles() {
        HookDefinition beforeHook = createHook();
        HookDefinition afterHook = createHook();
        HookDefinition beforeStepHook = createHook();
        HookDefinition afterStepHook = createHook();

        TestRunnerSupplier runnerSupplier = new TestRunnerSupplier(bus, runtimeOptions) {

            @Override
            public void loadGlue(Glue glue, List<URI> gluePaths) {
                glue.addBeforeHook(beforeHook);
                glue.addAfterHook(afterHook);
                glue.addBeforeStepHook(beforeStepHook);
                glue.addAfterStepHook(afterStepHook);
            }
        };

        runnerSupplier.get().runPickle(createEmptyPickle());

        verify(beforeHook, never()).execute(any(TestCaseState.class));
        verify(afterStepHook, never()).execute(any(TestCaseState.class));
        verify(afterHook, never()).execute(any(TestCaseState.class));
    }