Add urlState unit tests

To prevent future regression defects in this module (hopefully).
Note to self: fix indentation.