public void testPersistenceVariablesWithTypeChange() throws NamingException, NotSupportedException, SystemException, RollbackException, HeuristicMixedException, HeuristicRollbackException {
MyEntity myEntity = new MyEntity("This is a test Entity with annotation in fields");
MyEntityMethods myEntityMethods = new MyEntityMethods("This is a test Entity with annotations in methods");
MyEntityOnlyFields myEntityOnlyFields = new MyEntityOnlyFields("This is a test Entity with annotations in fields and without accesors methods");
MyVariableSerializable myVariableSerializable = new MyVariableSerializable("This is a test SerializableObject");
EntityManager em = emf.createEntityManager();
UserTransaction utx = (UserTransaction) new InitialContext().lookup( "java:comp/UserTransaction" );
utx.begin();
em.joinTransaction();
em.persist(myEntity);
em.persist(myEntityMethods);
em.persist(myEntityOnlyFields);
utx.commit();
em.close();
Environment env = createEnvironment();
KnowledgeBase kbase = createKnowledgeBase( "VariablePersistenceStrategyProcessTypeChange.rf" );
StatefulKnowledgeSession ksession = createSession( kbase, env );