@Override
            public void evaluate() throws Throwable {
                TestcontainersConfiguration previous = REF.get();
                if (previous == null) {
                    previous = TestcontainersConfiguration.getInstance();
                }
                REF.set(Mockito.spy(previous));

                try {
                    base.evaluate();
                } finally {
                    REF.set(previous);
                }
            }
This {@link TestRule} applies a spy on {@link TestcontainersConfiguration}
for testing features that depend on the global configuration.
core/src/test/java/org/testcontainers/utility/MockTestcontainersConfigurationRule.java