src/main/java/org/jinstagram/utils/MapUtils.java
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;
    }
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;
    }
Sorts a Map

@param map unsorted map
@return sorted map