### Question:
ConnectionPoolUtil { public static Connection getConnection( LogChannelInterface log, DatabaseMeta dbMeta, String partitionId ) throws Exception { return getConnection( log, dbMeta, partitionId, dbMeta.getInitialPoolSize(), dbMeta.getMaximumPoolSize() ); }  static Connection getConnection( LogChannelInterface log, DatabaseMeta dbMeta, String partitionId ); static Connection getConnection( LogChannelInterface log, DatabaseMeta dbMeta, String partitionId,
      int initialSize, int maximumSize ); static final String DEFAULT_AUTO_COMMIT; static final String DEFAULT_READ_ONLY; static final String DEFAULT_TRANSACTION_ISOLATION; static final String DEFAULT_CATALOG; static final String INITIAL_SIZE; static final String MAX_ACTIVE; static final String MAX_IDLE; static final String MIN_IDLE; static final String MAX_WAIT; static final String VALIDATION_QUERY; static final String TEST_ON_BORROW; static final String TEST_ON_RETURN; static final String TEST_WHILE_IDLE; static final String TIME_BETWEEN_EVICTION_RUNS_MILLIS; static final String POOL_PREPARED_STATEMENTS; static final String MAX_OPEN_PREPARED_STATEMENTS; static final String ACCESS_TO_UNDERLYING_CONNECTION_ALLOWED; static final String REMOVE_ABANDONED; static final String REMOVE_ABANDONED_TIMEOUT; static final String LOG_ABANDONED; static final int defaultInitialNrOfConnections; static final int defaultMaximumNrOfConnections; }### Answer:
@Test public void testGetConnection() throws Exception { when( dbMeta.getName() ).thenReturn( "CP1" ); when( dbMeta.getPassword() ).thenReturn( PASSWORD ); Connection conn = ConnectionPoolUtil.getConnection( logChannelInterface, dbMeta, "", 1, 2 ); assertTrue( conn != null ); }
@Test public void testGetConnectionEncrypted() throws Exception { when( dbMeta.getName() ).thenReturn( "CP2" ); when( dbMeta.getPassword() ).thenReturn( ENCR_PASSWORD ); Connection conn = ConnectionPoolUtil.getConnection( logChannelInterface, dbMeta, "", 1, 2 ); assertTrue( conn != null ); }