p.put("ReloadableEntityManagerFactoryTest.JdbcUrl", "jdbc:hsqldb:mem:bval");
return p;
}
@Test public void reload() {
final ReloadableEntityManagerFactory remft = (ReloadableEntityManagerFactory) emf;
final EntityManagerFactory originalEmf = remft.getDelegate();
assertEquals("false", emf.getProperties().get("openjpa.DataCache"));
select();
remft.setProperty("openjpa.DataCache", "true(Types=" + MyEntity.class.getName() + ")");
remft.reload();
select();
assertEquals("true(Types=" + MyEntity.class.getName() + ")", emf.getProperties().get("openjpa.DataCache"));
final EntityManagerFactory reloadedEmf = remft.getDelegate();
assertNotSame(originalEmf, reloadedEmf);
}