docs: private static PoolingDataSource<PoolableConnection> getPoolingDataSource(final String url,
                                                                                final ConcurrentMap<String, String> properties,
                                                                                final ConnectionProperties poolSpec) {
  
          // assert in private method
          assert url != null : "The url cannot be null";
          assert properties != null : "The properties cannot be null";
          assert poolSpec != null : "The pol spec cannot be null";
  
          LOG.debug("Creating new pooled data source for '" + url + "'");
  
          // convert the properties hashmap to java properties
          final Properties props = new Properties();
          props.putAll(properties);
  
          // create a Apache DBCP pool configuration from the pool spec
          final GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
          poolConfig.setMaxTotal(poolSpec.getMaxTotal());
          poolConfig.setMaxIdle(poolSpec.getMaxIdle());
          poolConfig.setMinIdle(poolSpec.getMinIdle());
          poolConfig.setMaxWaitMillis(poolSpec.getMaxWaitMillis());
          poolConfig.setTestOnCreate(poolSpec.isTestOnCreate());
          poolConfig.setTestOnBorrow(poolSpec.isTestOnBorrow());
          poolConfig.setTestOnReturn(poolSpec.isTestOnReturn());
          poolConfig.setTestWhileIdle(poolSpec.isTestWhileIdle());
          poolConfig.setTimeBetweenEvictionRunsMillis(poolSpec.getTimeBetweenEvictionRunsMillis());
          poolConfig.setNumTestsPerEvictionRun(poolSpec.getNumTestsPerEvictionRun());
          poolConfig.setMinEvictableIdleTimeMillis(poolSpec.getMinEvictableIdleTimeMillis());
          poolConfig.setSoftMinEvictableIdleTimeMillis(poolSpec.getSoftMinEvictableIdleTimeMillis());
          poolConfig.setLifo(poolSpec.isLifo());
  
  
          // create the pool and assign the factory to the pool
          final org.apache.commons.dbcp2.ConnectionFactory connFactory = new DriverManagerConnectionFactory(url, props);
          final PoolableConnectionFactory poolConnFactory = new PoolableConnectionFactory(connFactory, null);
          poolConnFactory.setDefaultAutoCommit(poolSpec.isDefaultAutoCommit());
          poolConnFactory.setDefaultReadOnly(poolSpec.isDefaultReadOnly());
          poolConnFactory.setDefaultTransactionIsolation(poolSpec.getDefaultTransactionIsolation());
          poolConnFactory.setCacheState(poolSpec.isCacheState());
          poolConnFactory.setValidationQuery(poolSpec.getValidationQuery());
          poolConnFactory.setMaxConnLifetimeMillis(poolSpec.getMaxConnLifetimeMillis());
          final GenericObjectPool<PoolableConnection> connPool = new GenericObjectPool<>(poolConnFactory, poolConfig);
          poolConnFactory.setPool(connPool);
  
          // create a new pooled data source
          return new PoolingDataSource<>(connPool);
      }