### Question:
Stats { public LinkedHashMap<String,Double> getStatistics(String group, String scenario, String step) { return stats.get(group+SEP+scenario+SEP+step); }  void putStatisticType(Stat stat); Stat getStatisticType(String key); Set<String> getStatisticTypes(); Set<String> getStatisticKeys(); LinkedHashMap<String,Double> getStatistics(String group, String scenario, String step); LinkedHashMap<String,Double> getStatistics(String group, String scenario); LinkedHashMap<String,Double> getStatistics(String groupOrKey); Double getStatistic(String name,String group, String scenario, String step); Double getStatistic(String name,String group, String scenario); Double getStatistic(String name,String groupOrKey); void putStatistic(String name, Double value, String group, String scenario, String step); void putStatistic(String name,Double value, String group, String scenario); void putStatistic(String name,Double value,String groupOrKey); void putKey(String group, String scenario, String step); void putKey(String group, String scenario); void putKey(String groupOrKey); void addStatistics(Stats stats); boolean isEmpty(); static String SEP; }### Answer:
@Test public void testGetStatistics() { Stats stats = new Stats(); stats.putStatistic("avg", 1.0,"grp","scn","stp"); stats.putStatistic("cnt", 2.0,"grp","scn","stp"); LinkedHashMap<String,Double> result =stats.getStatistics("grp", "scn", "stp"); int i = 0; for (Entry<String, Double> set : result.entrySet()) { if (i==0) assertEquals("avg",set.getKey()); else assertEquals("cnt",set.getKey()); i++; } }