finally managed to mock angularjs URL constant. can start writing good tests for services #40