public void testRedeployment() throws Exception {
addEntityCheckCache();
getEnvironment().getSessionFactory().close();
bindToJndi = false;
ExecutionEnvironment environment = new ExecutionEnvironment( this );
environment.initialize();
setEnvironment(environment);
addEntityCheckCache();
JndiInfinispanRegionFactory regionFactory = (JndiInfinispanRegionFactory) ((SessionFactoryImplementor)
environment.getSessionFactory()).getSettings().getRegionFactory();
Cache cache = regionFactory.getCacheManager().getCache("org.hibernate.test.cache.infinispan.functional.Item");