return jdbcBucketCacheStore;
}
public void testNotCreateConnectionFactory() throws Exception {
JdbcBinaryCacheStore jdbcBucketCacheStore = new JdbcBinaryCacheStore();
JdbcBinaryCacheStoreConfig config = new JdbcBinaryCacheStoreConfig(false);
config.setCreateTableOnStart(false);
jdbcBucketCacheStore.init(config, null, new TestObjectStreamMarshaller());
jdbcBucketCacheStore.start();
assert jdbcBucketCacheStore.getConnectionFactory() == null;
/* this will make sure that if a method like stop is called on the connection then it will barf an exception */
ConnectionFactory connectionFactory = createMock(ConnectionFactory.class);
TableManipulation tableManipulation = createMock(TableManipulation.class);
config.setTableManipulation(tableManipulation);
tableManipulation.start(connectionFactory);
replay(tableManipulation);
jdbcBucketCacheStore.doConnectionFactoryInitialization(connectionFactory);
verify(tableManipulation);