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 backends_are_asked_for_snippets_for_undefined_steps() {
        Backend backend = mock(Backend.class);
        when(backend.getSnippet()).thenReturn(new TestSnippet());
        ObjectFactory objectFactory = mock(ObjectFactory.class);
        Runner runner = new Runner(bus, singletonList(backend), objectFactory, runtimeOptions);
        runner.runPickle(createPicklesWithSteps());
        verify(backend).getSnippet();
    }