### Question:
RepositoryDelegateFactory { public static RepositoryDelegate createRepositoryDelegate( String url, Properties info, JcrContextFactory contextFactory ) throws SQLException { if (!acceptUrl(url)) { throw new SQLException(JdbcI18n.invalidUrlPrefix.text(JcrDriver.JNDI_URL_PREFIX, JcrDriver.HTTP_URL_PREFIX)); } RepositoryDelegate jcri = create(url, info, contextFactory); return jcri; }  static RepositoryDelegate createRepositoryDelegate( String url,
                                                               Properties info,
                                                               JcrContextFactory contextFactory ); static boolean acceptUrl( String url );  }### Answer:
@Test public void shouldCreateLocalRepositoryDelegate() throws SQLException { RepositoryDelegate delegate = RepositoryDelegateFactory.createRepositoryDelegate(VALID_JNDI_URL_WITH_PARMS, new Properties(), null); assertThat(delegate, instanceOf(LocalRepositoryDelegate.class)); }
@Test public void shouldSupportCreatingHttpRepositoryDelegate() throws SQLException { RepositoryDelegateFactory.createRepositoryDelegate(VALID_HTTP_URL, new Properties(), null); }
@Test(expected = SQLException.class) public void shouldNotSupportCreatingInvalidURL() throws SQLException { RepositoryDelegateFactory.createRepositoryDelegate(INVALID_URL, new Properties(), null); }