private DataSource getDataSource() {
        if (dataSource == null) {
            lock.lock();
            try {
                if (dataSource == null) {
                    dataSource = createDataSource();
                }
            } finally {
                lock.unlock();
            }
        }
        return dataSource;
    }
JUnit {@code @Rule} to manage a Jdbi instance pointed to a managed database.
testing/src/main/java/org/jdbi/v3/testing/JdbiRule.java