Refactored RuntimeTest