Refactor PersistenceContext tests