Tidy up getUrls code
Duplicated some tests but with array of URLs