@Override
    public void afterTestExecution(ExtensionContext context) throws Exception {
        ScenarioBase scenario = getScenario();
        try {
            reportPotentialExecutionException(scenario, context);
            scenario.finished();

            // ignore test when scenario is not implemented
            Assumptions.assumeTrue(
                EnumSet.of(SUCCESS, FAILED, ABORTED).contains(scenario.getScenarioModel().getExecutionStatus()));

        } catch (Exception e) {
            throw e;
        } catch (Throwable e) {
            throw new RuntimeException(e);
        } finally {
            ScenarioHolder.get().removeScenarioOfCurrentThread();
        }
    }
This extension enables JGiven for JUnit 5 Tests.
<p>
Just annotate your test class with {@code @ExtendWith( JGivenExtension.class )}
<p>
You can then inject stage classes by using the {@see ScenarioStage} annotation
<p>
As an alternative you can also inherit from one of the following predefined base classes:
<ul>
    <li>{@link ScenarioTest}</li>
    <li>{@link SimpleScenarioTest}</li>
</ul>

@see ScenarioTest
@see SimpleScenarioTest
jgiven-junit5/src/main/java/com/tngtech/jgiven/junit5/JGivenExtension.java