Refactor RF test