To cover the test coverage for getURL method, use Test.setCurrentPage(Page.PageName).
Test.setCurrentPage(Page.PageName) will help you to cover the codes which makes use of ApexPages.currentPage().getUrl().
Cheers!!!
Test.setCurrentPage(Page.PageName) will help you to cover the codes which makes use of ApexPages.currentPage().getUrl().
Cheers!!!