private Map<String, Object> convertLocationToMap(Location location) { Map<String, Object> map = Maps.newHashMap(); map.put("href", location.getHref()); map.put("protocol", location.getProtocol()); map.put("host", location.getHost()); map.put("hostname", location.getHostname()); map.put("port", location.getPort()); map.put("pathname", location.getPathname()); map.put("search", location.getSearch()); map.put("hash", location.getHash()); map.put("href", location.getHref()); return map; }