### Question:
HiveConnectionPool extends AbstractControllerService implements HiveDBCPService { @Override public Connection getConnection() throws ProcessException { try { if (ugi != null) { synchronized(this) { ugi.checkTGTAndReloginFromKeytab(); } try { return ugi.doAs((PrivilegedExceptionAction<Connection>) () -> dataSource.getConnection()); } catch (UndeclaredThrowableException e) { Throwable cause = e.getCause(); if (cause instanceof SQLException) { throw (SQLException) cause; } else { throw e; } } } else { getLogger().info("Simple Authentication"); return dataSource.getConnection(); } } catch (SQLException | IOException | InterruptedException e) { getLogger().error("Error getting Hive connection", e); throw new ProcessException(e); } }  @OnEnabled void onConfigured(final ConfigurationContext context); @OnDisabled void shutdown(); @Override Connection getConnection(); @Override String toString(); @Override String getConnectionURL(); static final PropertyDescriptor DATABASE_URL; static final PropertyDescriptor HIVE_CONFIGURATION_RESOURCES; static final PropertyDescriptor DB_USER; static final PropertyDescriptor DB_PASSWORD; static final PropertyDescriptor MAX_WAIT_TIME; static final PropertyDescriptor MAX_TOTAL_CONNECTIONS; static final PropertyDescriptor VALIDATION_QUERY; }### Answer:
@Test(expected = ProcessException.class) public void testGetConnectionSqlException() throws SQLException { SQLException sqlException = new SQLException("bad sql"); when(basicDataSource.getConnection()).thenThrow(sqlException); try { hiveConnectionPool.getConnection(); } catch (ProcessException e) { assertEquals(sqlException, e.getCause()); throw e; } }