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 steps_are_skipped_after_failure() {
        StubStepDefinition stepDefinition = spy(new StubStepDefinition("some step"));
        Pickle pickleMatchingStepDefinitions = createPickleMatchingStepDefinitions(stepDefinition);

        final HookDefinition failingBeforeHook = createHook();
        doThrow(new RuntimeException("Boom")).when(failingBeforeHook).execute(ArgumentMatchers.any());
        TestRunnerSupplier runnerSupplier = new TestRunnerSupplier(bus, runtimeOptions) {
            @Override
            public void loadGlue(Glue glue, List<URI> gluePaths) {
                glue.addBeforeHook(failingBeforeHook);
                glue.addStepDefinition(stepDefinition);
            }
        };

        runnerSupplier.get().runPickle(pickleMatchingStepDefinitions);

        InOrder inOrder = inOrder(failingBeforeHook, stepDefinition);
        inOrder.verify(failingBeforeHook).execute(any(TestCaseState.class));
        inOrder.verify(stepDefinition, never()).execute(any(Object[].class));
    }