Router test helpers

A couple of routing test helpers to make it easy to stub out routing calls.