I agree this helper is only useful for this router, and is perhaps a bit too clever and generalized. On the other hand, I think it still saves on fair amount of code duplication, and makes clearer the intent and expectations of each individual test. I can certainly make the helper less clever and more specific to this router though.