@Test(expected = SystemException.class)
public void testGetConnection_FailToLoadDriver() throws Exception {

    ComboPooledDataSource cpds = createMock(ComboPooledDataSource.class);
    expectNew(ComboPooledDataSource.class).andReturn(cpds);
    cpds.setDriverClass("org.postgresql.Driver");
    expectLastCall().andThrow(new RuntimeException("driver not found"));
    replay(cpds, ComboPooledDataSource.class);
    datasource.getConnection("host", "port", "user", "password");
}