wrote test cases by mocking database for searched locations.