Neo4jDriver implements java.sql.Driver { @Override public boolean acceptsURL(String url) throws SQLException { if (url == null) { throw new SQLException("null is not a valid url"); } String[] pieces = url.split(":"); if (pieces.length > 3 && url.startsWith(JDBC_PREFIX)) { if (driverPrefix != null) { if(pieces[2].matches(driverPrefix)) { return true; } } else { return true; } } return false; } protected  Neo4jDriver(String prefix); @Override DriverPropertyInfo[] getPropertyInfo(String url, Properties info); @Override int getMajorVersion(); @Override int getMinorVersion(); @Override boolean jdbcCompliant(); @Override Logger getParentLogger(); @Override boolean acceptsURL(String url);  }
@Test public void acceptsURL() throws Exception { assertTrue(neo4jDriver.acceptsURL("jdbc:neo4j:http: assertTrue(neo4jDriver.acceptsURL("jdbc:neo4j:http: assertTrue(neo4jDriver.acceptsURL("jdbc:neo4j:http: assertTrue(neo4jDriver.acceptsURL("jdbc:neo4j:http: assertTrue(neo4jDriver.acceptsURL("jdbc:neo4j:http: assertFalse(neo4jDriver.acceptsURL("jdbc:mysql: assertFalse(neo4jDriver.acceptsURL("jdbc:postgresql: }