### Question:
ExploreDriver implements Driver { @Override public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) { return null; } ExploreConnectionParams params = ExploreConnectionParams.parseConnectionUrl(url); String authToken = getString(params, ExploreConnectionParams.Info.EXPLORE_AUTH_TOKEN, null); String namespace = getString(params, ExploreConnectionParams.Info.NAMESPACE, NamespaceId.DEFAULT.getNamespace()); boolean sslEnabled = getBoolean(params, ExploreConnectionParams.Info.SSL_ENABLED, false); boolean verifySSLCert = getBoolean(params, ExploreConnectionParams.Info.VERIFY_SSL_CERT, true); ExploreClient exploreClient = new FixedAddressExploreClient(params.getHost(), params.getPort(), authToken, sslEnabled, verifySSLCert); try { exploreClient.ping(); } catch (UnauthenticatedException e) { throw new SQLException("Cannot connect to " + url + ", not authenticated.", e); } catch (ServiceUnavailableException | ExploreException e) { throw new SQLException("Cannot connect to " + url + ", service not available.", e); } return new ExploreConnection(exploreClient, namespace, params); }  @Override Connection connect(String url, Properties info); @Override boolean acceptsURL(String url); @Override DriverPropertyInfo[] getPropertyInfo(String s, Properties properties); @Override int getMajorVersion(); @Override int getMinorVersion(); @Override boolean jdbcCompliant(); @Override java.util.logging.Logger getParentLogger();  }### Answer:
@Test public void testDriverConnection() throws Exception { ExploreDriver driver = new ExploreDriver(); Assert.assertNull(driver.connect("foobar", null)); try { driver.connect(Constants.Explore.Jdbc.URL_PREFIX + "somerandomhostthatisnothing:11015", null); Assert.fail(); } catch (SQLException expected) { } try { Assert.assertNotNull(driver.connect(exploreServiceUrl + "&ssl.enabled=true", null)); Assert.fail(); } catch (SQLException expected) { } Assert.assertNotNull(driver.connect(exploreServiceUrl, null)); Assert.assertNotNull(driver.connect(exploreServiceUrl + "&ssl.enabled=false", null)); Assert.assertNotNull(driver.connect(exploreServiceUrl + "&auth.token=bar", null)); Assert.assertNotNull(driver.connect(exploreServiceUrl + "&auth.token", null)); }