RepositoryDelegateFactory { public RepositoryDelegate createRepositoryDelegate( String url, Properties info, JcrContextFactory contextFactory ) throws SQLException { if (!acceptUrl(url)) { throw new SQLException(JdbcLocalI18n.invalidUrlPrefix.text(LocalJcrDriver.JNDI_URL_PREFIX)); } return create(determineProtocol(url), url, info, contextFactory); } protected  RepositoryDelegateFactory(); RepositoryDelegate createRepositoryDelegate( String url,
                                                        Properties info,
                                                        JcrContextFactory contextFactory ); boolean acceptUrl( String url );  }
@Test( expected = SQLException.class ) public void shouldNotSupportCreatingInvalidURL() throws SQLException { factory().createRepositoryDelegate(INVALID_URL, new Properties(), null); }