minor refactor: refactor some test code that caused codenarc errors
3 files changed