@Override
    public void beforeAll(ExtensionContext extensionContext) throws Exception {
        Class<?> clazz = extensionContext.getRequiredTestClass();
        Predicate<Field> predicate = (field -> ModifierSupport.isStatic(field)
                && JenkinsConfiguredWithCodeRule.class.isAssignableFrom(field.getType()));
        Field field = findFields(clazz, predicate, HierarchyTraversalMode.BOTTOM_UP).stream()
                .findFirst()
                .orElse(null);
        if (field == null) {
            return;
        }

        final JenkinsConfiguredWithCodeRule rule =
                new JUnit5JenkinsConfiguredWithCodeRule(extensionContext, field.getDeclaredAnnotations());

        extensionContext
                .getStore(NAMESPACE)
                .getOrComputeIfAbsent(KEY, key -> rule, JenkinsConfiguredWithCodeRule.class);
        try {
            rule.before();
        } catch (Throwable e) {
            throw new ExtensionContextException(e.getMessage(), e);
        }
        field.setAccessible(true);
        field.set(null, rule);
    }
JUnit 5 extension providing {@link JenkinsConfiguredWithCodeRule} integration.

@see WithJenkinsConfiguredWithCode
test-harness/src/main/java/io/jenkins/plugins/casc/misc/junit/jupiter/JenkinsConfiguredWithCodeExtension.java