### Question:
PhoenixEmbeddedDriver implements Driver, SQLCloseable { @Override public boolean acceptsURL(String url) throws SQLException { if (url.startsWith(PhoenixRuntime.JDBC_PROTOCOL)) { if (url.length() == PhoenixRuntime.JDBC_PROTOCOL.length()) { return true; } if (PhoenixRuntime.JDBC_PROTOCOL_TERMINATOR == url.charAt(PhoenixRuntime.JDBC_PROTOCOL.length())) { return true; } if (PhoenixRuntime.JDBC_PROTOCOL_SEPARATOR == url.charAt(PhoenixRuntime.JDBC_PROTOCOL.length())) { int protoLength = PhoenixRuntime.JDBC_PROTOCOL.length() + 1; if (url.length() == protoLength) { return true; } if (url.startsWith(PhoenixRuntime.JDBC_THIN_PROTOCOL)) { return false; } if (!url.startsWith(DNC_JDBC_PROTOCOL_SUFFIX, protoLength)) { return true; } } } return false; } PhoenixEmbeddedDriver(); abstract QueryServices getQueryServices(); @Override boolean acceptsURL(String url); @Override Connection connect(String url, Properties info); @Override int getMajorVersion(); @Override int getMinorVersion(); @Override DriverPropertyInfo[] getPropertyInfo(String url, Properties info); @Override boolean jdbcCompliant(); @Override Logger getParentLogger(); @Override void close(); static boolean isTestUrl(String url); final static String MAJOR_VERSION_PROP; final static String MINOR_VERSION_PROP; final static String DRIVER_NAME_PROP; static final ReadOnlyProps DEFAULT_PROPS; }### Answer:
@Test public void testNotAccept() throws Exception { Driver driver = new PhoenixDriver(); assertFalse(driver.acceptsURL("jdbc:phoenix: assertFalse(driver.acceptsURL("jdbc:phoenix:localhost;test=true;bar=foo")); assertFalse(driver.acceptsURL("jdbc:phoenix:localhost;test=true")); assertTrue(driver.acceptsURL("jdbc:phoenix:localhost:123")); assertTrue(driver.acceptsURL("jdbc:phoenix:localhost:123;untest=true")); assertTrue(driver.acceptsURL("jdbc:phoenix:localhost:123;untest=true;foo=bar")); DriverManager.deregisterDriver(driver); }