@Override
    public void afterEach(ExtensionContext context) throws Exception {

        try {
            super.afterEach(context);
        } finally {
            if (this.pgIsManaged) {
                pg.afterEach(context);
            }
        }
    }
Jdbi PostgreSQL JUnit 5 rule using the pg-embedded component.
<p>
Using this class with the {@code @ExtendWith} annotation is equivalent to using the {@link SingleDatabaseBuilder} to create a {@link EmbeddedPgExtension}
that creates a new postgres instance per test. This is slower than using the {@link de.softwareforge.testing.postgres.junit5.MultiDatabaseBuilder} and using
{@link JdbiExtension#postgres(EmbeddedPgExtension)}.
<p>
Override methods for special case construction:

<pre>{@code
    @RegisterExtension
    public JdbiExtension extension = new JdbiPostgresExtension(pg) {
        @Override
        protected DataSource createDataSource() {
           ...
        }
    };
}</pre>
<p>
Use with {@link org.junit.jupiter.api.extension.ExtendWith}:

<pre>{@code
@ExtendWith(JdbiPostgresExtension.class)
public class DatabaseTest {
    @Test
    public void testWithJdbi(Jdbi jdbi) {
        ...
    }

    @Test
    public void testWithHandle(Handle handle) {
        ...
    }
}
}</pre>
testing/src/main/java/org/jdbi/v3/testing/junit5/JdbiPostgresExtension.java