### Question:
MapUtils { public static <K, V extends Comparable<V>> LinkedHashMap<K, V> keysOfHighestValues( Map<K, V> map, int topN) { return keysOfHighestValues(map, topN, true); }  static K keyOfHighestValue(Map<K, V> map); static LinkedHashMap<K, V> keysOfHighestValues(
            Map<K, V> map, int topN); static LinkedHashMap<K, V> keysOfHighestValues(
            Map<K, V> map, int topN, final boolean reverse); static Map<K, V> sortByValue(
            Map<K, V> map); static Map<K, V> sortByValue(
            Map<K, V> map, final boolean reverse);  }### Answer:
@Test public void testKeyOfHighestValues() { Map<String, Double> mapp = new HashMap<String, Double>(); mapp.put("s3.5", 3.5); mapp.put("s1.5", 1.5); mapp.put("s0.5", 0.5); mapp.put("s0.6", 0.6); mapp.put("2s3.5", 3.5); mapp.put("s2.6", 2.6); LinkedHashMap<String, Double> m = MapUtils.keysOfHighestValues(mapp, 3); Iterator<String> it = m.keySet().iterator(); assertEquals(3, m.size()); assertTrue(it.next().endsWith("s3.5")); assertTrue(it.next().endsWith("s3.5")); assertEquals("s2.6", it.next()); LinkedHashMap<String, Double> m2 = keysOfHighestValues(mapp, 0); assertEquals(0, m2.size()); LinkedHashMap<String, Double> m3 = keysOfHighestValues(mapp, 100); assertEquals(m3.size(), mapp.size()); }