Fix tests life cycle order