Unit test for URL generation