title: How to test that a certain URL resolves to a specific state
body: <p>I'm using UI Router with my Angular setup, and I'd really like to test / ensure that a specific URL resolves to a specific state (even better if I can inspect the resolved <code>$stateParams</code> values as well).</p>
  
  <p>It's pretty trivial how to do this the other way around; that is, resolving from a state with parameters and inspecting the URL that gets resolved:</p>
  
  <pre><code>var resolvedUrl = $state.href('some-state', { foo : 123 });
  resolvedUrl.should.be('/somestate/123');
  </code></pre>
  
  <p>But how would I flip that around? The <code>$state</code> service doesn't seem to have methods on doing that, and I can't seem to identify any service in the UI Router API that I can hook onto for this.</p>