class ScenarioNodeBuilder {

    public BasicScenarioNode buildBasicScenarioNode(final Scenario scenario, final ExampleParameter scenarioParameters,
                                                    Set<String> inheritedTags, int depth) {

        Set<String> allTags = Sets.newHashSet();
        allTags.addAll(inheritedTags);

        if (scenario.getTags() != null) {

            allTags.addAll(scenario.getTags());
        }

        SubstepNode background = scenario.hasBackground() ? substepNodeBuilder.build(scenario.getDescription(),
                scenario.getBackground().getSteps(), parameters.getSyntax().getSubStepsMap(), null, scenarioParameters,
                true, allTags, depth + 1) : null;

        List<StepNode> steps = Lists.newArrayList();

        if (scenario.hasSteps()) {

            for (Step step : scenario.getSteps()) {

                steps.add(substepNodeBuilder.buildStepNode(scenario.getDescription(), step,
                        parameters.getSyntax().getSubStepsMap(), null, scenarioParameters, false, allTags, depth + 1));
            }

        }

        String scenarioDescription =
                scenarioParameters == null ? scenario.getDescription() :
                SubstepNodeBuilder.substitutePlaceholders(scenario.getDescription(), scenarioParameters.getParameters());

        return new BasicScenarioNode(scenarioDescription, background, steps, allTags, depth);
    }

      ScenarioNodeBuilder(TestParameters parameters);

}