// Path: core/src/main/java/eu/drus/jpa/unit/core/DecoratorRegistrar.java
// public static List<TestClassDecorator> getClassDecorators() {
//     final List<TestClassDecorator> decorators = new ArrayList<>();
//     CLASS_DECORATORS.iterator().forEachRemaining(decorators::add);
//     return decorators;
// }
// 
// Path: core/src/main/java/eu/drus/jpa/unit/core/DecoratorRegistrar.java
// public static List<TestMethodDecorator> getMethodDecorators() {
//     final List<TestMethodDecorator> decorators = new ArrayList<>();
//     METHOD_DECORATORS.iterator().forEachRemaining(decorators::add);
//     return decorators;
// }


import static eu.drus.jpa.unit.core.DecoratorRegistrar.getClassDecorators;
import static eu.drus.jpa.unit.core.DecoratorRegistrar.getMethodDecorators;
import java.util.Comparator;
import java.util.Iterator;
            it.next().beforeAll(invocation);
        }
    }

    public void processAfterAll(final TestInvocation invocation) throws Exception {
        final Iterator<TestClassDecorator> it = classDecoratorIterator(invocation.getContext(), AFTER_COMPARATOR);
        while (it.hasNext()) {
            it.next().afterAll(invocation);
        }
    }

    public void processBefore(final TestInvocation invocation) throws Exception {
        final Iterator<TestMethodDecorator> it = methodDecoratorIterator(invocation.getContext(), BEFORE_COMPARATOR);
        while (it.hasNext()) {
            it.next().beforeTest(invocation);
        }
    }

    public void processAfter(final TestInvocation invocation) throws Exception {
        final Iterator<TestMethodDecorator> it = methodDecoratorIterator(invocation.getContext(), AFTER_COMPARATOR);
        while (it.hasNext()) {
            it.next().afterTest(invocation);
        }
    }

    private Iterator<TestClassDecorator> classDecoratorIterator(final ExecutionContext ctx, final Comparator<TestDecorator> comparator) {
        return getClassDecorators().stream().filter(d -> d.isConfigurationSupported(ctx)).sorted(comparator).iterator();
    }

    private Iterator<TestMethodDecorator> methodDecoratorIterator(final ExecutionContext ctx, final Comparator<TestDecorator> comparator) {
// Path: core/src/main/java/eu/drus/jpa/unit/core/DecoratorRegistrar.java
// public static List<TestClassDecorator> getClassDecorators() {
//     final List<TestClassDecorator> decorators = new ArrayList<>();
//     CLASS_DECORATORS.iterator().forEachRemaining(decorators::add);
//     return decorators;
// }
// 
// Path: core/src/main/java/eu/drus/jpa/unit/core/DecoratorRegistrar.java
// public static List<TestMethodDecorator> getMethodDecorators() {
//     final List<TestMethodDecorator> decorators = new ArrayList<>();
//     METHOD_DECORATORS.iterator().forEachRemaining(decorators::add);
//     return decorators;
// }


// Path: core/src/main/java/eu/drus/jpa/unit/spi/DecoratorExecutor.java
import static eu.drus.jpa.unit.core.DecoratorRegistrar.getClassDecorators;
import static eu.drus.jpa.unit.core.DecoratorRegistrar.getMethodDecorators;
import java.util.Comparator;
import java.util.Iterator;

            it.next().beforeAll(invocation);
        }
    }

    public void processAfterAll(final TestInvocation invocation) throws Exception {
        final Iterator<TestClassDecorator> it = classDecoratorIterator(invocation.getContext(), AFTER_COMPARATOR);
        while (it.hasNext()) {
            it.next().afterAll(invocation);
        }
    }

    public void processBefore(final TestInvocation invocation) throws Exception {
        final Iterator<TestMethodDecorator> it = methodDecoratorIterator(invocation.getContext(), BEFORE_COMPARATOR);
        while (it.hasNext()) {
            it.next().beforeTest(invocation);
        }
    }

    public void processAfter(final TestInvocation invocation) throws Exception {
        final Iterator<TestMethodDecorator> it = methodDecoratorIterator(invocation.getContext(), AFTER_COMPARATOR);
        while (it.hasNext()) {
            it.next().afterTest(invocation);
        }
    }

    private Iterator<TestClassDecorator> classDecoratorIterator(final ExecutionContext ctx, final Comparator<TestDecorator> comparator) {
        return getClassDecorators().stream().filter(d -> d.isConfigurationSupported(ctx)).sorted(comparator).iterator();
    }

    private Iterator<TestMethodDecorator> methodDecoratorIterator(final ExecutionContext ctx, final Comparator<TestDecorator> comparator) {
        return getMethodDecorators().stream().filter(d -> d.isConfigurationSupported(ctx)).sorted(comparator).iterator();