Add urlState unit tests

To prevent future regression defects in this module (hopefully).