public Connection getConnection() {
        return getConfig().isShared() ? pooledConnection() : singleUseConnection();
    }
@Test
    public void should_return_same_connection_when_shared() throws Exception {
        DataConnectionConfig config = new DataConnectionConfig(SHARED_DATA_CONNECTION_CONFIG)
                .setProperty("maximumPoolSize", "1");

        jdbcDataConnection = new JdbcDataConnection(config);

        connection1 = jdbcDataConnection.getConnection();
        assertThat(connection1).isNotNull();
        Connection unwrapped1 = connection1.unwrap(Connection.class);

        connection1.close();

        // used maximumPoolSize above, after closing it should return same connection
        connection2 = jdbcDataConnection.getConnection();
        assertThat(connection2).isNotNull();
        Connection unwrapped2 = connection2.unwrap(Connection.class);

        assertThat(unwrapped1).isSameAs(unwrapped2);
    }