@Test
public void testDifferentSessionProvider() {

    // sanity check
    customProvider = new SessionHolderProvider() {
        /**
         * @see org.springframework.extensions.jcr.SessionHolderProvider#acceptsRepository(java.lang.String)
         */
        @Override
        public boolean acceptsRepository(String repo) {
            return false;
        }
        /**
         * @see org.springframework.extensions.jcr.SessionHolderProvider#createSessionHolder(javax.jcr.Session)
         */
        @Override
        public SessionHolder createSessionHolder(Session session) {
            return null;
        }
    };
    providers = new ArrayList<SessionHolderProvider>();
    providers.add(customProvider);
    replay(sessionfactory, session, repository);
    assertSame(GenericSessionHolderProvider.class, providerManager.getSessionProvider(repository).getClass());
}