@Test
public void testCustomSessionProvider() {

    // sanity check
    providers = new ArrayList<SessionHolderProvider>();
    providers.add(customProvider);
    replay(sessionfactory, session, repository);
    assertSame(customProvider, providerManager.getSessionProvider(repository));
}