### Question:
MapUtils { public static String[] getRealRatio(HashMap<Long, Integer> table, int num) { String[] result = new String[2]; int[] hour = new int[2]; int sum = 0; for (Entry<Long, Integer> temp : table.entrySet()) { sum += temp.getValue(); if (temp.getValue() <= num) { hour[0]++; hour[1] += temp.getValue(); } } result[0] = Float.toString((float) (Math.round(((float) hour[0] / table.size()) * 10000)) / 100) + "%"; result[1] = Float.toString((float) (Math.round(((float) hour[1] / sum) * 10000)) / 100) + "%"; return result; }  static HashMap<String, String> tranToRatio(HashMap<Integer, Integer> table); static HashMap<Long, Integer> unionMaps(List<HashMap<Long, Integer>> table); static int getSum(HashMap<Long, Integer> table); static int[] getRealUses(HashMap<Long, Integer> table, int num); static String[] getRealRatio(HashMap<Long, Integer> table, int num); static int[] getRealCount(HashMap<Long, Integer> table, int num); static int getMaxKey(HashMap<Integer, String> map);  }### Answer:
@Test public void testGetRealRatio() { String[] result = MapUtils.getRealRatio(map3, 90); assertEquals("50.0%", result[0]); assertEquals("7.2%", result[1]); }