rts.test code with tests