### Question:
Stats { public Double getStatistic(String name,String group, String scenario, String step) { LinkedHashMap<String,Double> s = stats.get(group+SEP+scenario+SEP+step); return s!=null?s.get(name):null; }  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 testGetStatistic() { Stats stats = new Stats(); stats.putStatistic("avg", 1.0,"grp","scn","stp"); stats.putStatistic("cnt", 2.0,"grp","scn","stp"); assertEquals(1.0,stats.getStatistic("avg","grp","scn","stp"),0.1); }