### Question:
Stats { public Set<String> getStatisticKeys() { if (!stats.isEmpty()) return stats.keySet(); return 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 testGetStatisticKeys() { Stats stats = new Stats(); stats.putStatistic("avg", 1.0,"grp1"); stats.putStatistic("cnt", 2.0,"grp2"); String[] types = new String[] {"grp1","grp2"}; for (String key : stats.getStatisticKeys()) { boolean found = false; for (String type : types) { if (type.equalsIgnoreCase(key)) found = true; } assertTrue(found); } }