code: public static Map<String, String> sort(Map<String, String> map) {
          Preconditions.checkNotNull(map, "Cannot sort a null object.");
  
          Map<String, String> sorted = new LinkedHashMap<String, String>();
  
          for (String key : getSortedKeys(map)) {
              sorted.put(key, map.get(key));
          }
  
          return sorted;
      }
docs: Sorts a Map
  
  @param map unsorted map
  @return sorted map