Add Tests

Adds tests. Increases test coverage from 30% to 70% :smile_cat: 
Well, we either return `lastURI` or `null` either way, so I'm in favor of trimming the fat. Lean and mean.