@Test
    public void nested_steps_are_displayed_in_the_report() throws Throwable {
        getScenario().startScenario("test");

        given().something_with_nested_steps();

        when().something_happens();

        then().something_has_happen()
            .something_else_not();

        String string = PlainTextReporter.toString(getScenario().getScenarioModel());
        assertThat(string.replaceAll(System.getProperty("line.separator"), "\n"))
            .contains(""
                + " Test\n"
                + "\n"
                + "   Given something with nested steps\n"
                + "           Given something\n"
                + "           And something else\n"
                + "    When something happens\n"
                + "    Then something has happen\n"
                + "         something else not");

        StepModel parentStep = getScenario().getScenarioModel().getScenarioCases().get(0).getStep(0);
        long nestedDurations = parentStep.getNestedSteps().get(0).getDurationInNanos()
            + parentStep.getNestedSteps().get(1).getDurationInNanos();
        assertThat(parentStep.getDurationInNanos()).isGreaterThanOrEqualTo(nestedDurations);
    }
Please note that we do explicitly <strong>not</strong> use the ScenarioTest class for JUnit,
as this would require a dependency to jgiven-junit, which we have to avoid
here.
jgiven-core/src/test/java/com/tngtech/jgiven/report/text/PlainTextReporterTest.java