Refactoring test_rtwl