assertEquals(MockListenerInjector.class.getName(), testee.getListenerInjector());
// Where we can, validate stuff exposed by hibernate Settings
SessionFactory factory = testee.getInstance();
assertTrue(factory instanceof SessionFactoryImplementor);
Settings settings = ((SessionFactoryImplementor) factory).getSettings();
// assertEquals(TestableHibernate.class.getSimpleName() + testCount, settings.getSessionFactoryName());
assertEquals(HSQLDialect.class.getName(), testee.getDialect());
assertTrue(settings.getDialect() instanceof HSQLDialect);
assertTrue(settings.getTransactionFactory() instanceof JTATransactionFactory);
assertTrue(settings.getTransactionManagerLookup() instanceof TransactionManagerLookupImpl);
assertTrue(settings.getRegionFactory() instanceof MockRegionFactory);
assertEquals("aprefix", settings.getCacheRegionPrefix());
assertTrue(settings.isMinimalPutsEnabled());
assertTrue(settings.isSecondLevelCacheEnabled());
assertTrue(settings.isQueryCacheEnabled());
assertTrue(settings.isStructuredCacheEntriesEnabled());
assertEquals("schema", settings.getDefaultSchemaName());
assertEquals("catalog", settings.getDefaultCatalogName());
assertEquals(Integer.valueOf(9), settings.getJdbcFetchSize());
assertTrue(settings.isJdbcBatchVersionedData());
assertEquals(Integer.valueOf(13), settings.getMaximumFetchDepth());
assertTrue(settings.isScrollableResultSetsEnabled());
assertTrue(settings.isCommentsEnabled());
@SuppressWarnings("unchecked")
Map substitutions = settings.getQuerySubstitutions();
assertNotNull(substitutions);
assertEquals(1, substitutions.size());
assertEquals("value", substitutions.get("key"));
assertTrue(settings.getSqlStatementLogger().isLogToStdout());
assertTrue(settings.isGetGeneratedKeysEnabled());
assertTrue(settings.isStatisticsEnabled());
// For stuff not available via Settings, second best is to check the properties exposed by Hibernate object
Properties props = testee.getConfigurationProperties();
assertEquals(JTATransactionFactory.DEFAULT_USER_TRANSACTION_NAME, props.getProperty(Environment.USER_TRANSACTION));
assertEquals(MockCacheProvider.class.getName(), props.getProperty(Environment.CACHE_PROVIDER));