add test for geocoder.js file and refacto geocoder factory