Group { public void clear() { map.clear(); groupKeys.clear(); all.clear(); sourceToKeyMap.clear(); }  void addToGroup(K groupKey, T object); Array<T> getAll(); Array<K> getGroupKeys(); void remove(T object); void removeFromGroup(K groupKey, T object); Array<T> getGroup(K groupKey); void clearGroup(K groupKey); void clear();  }
@Test public void clear() { Group<String, String> group = new Group<String, String>(); group.addToGroup("a", "b"); group.addToGroup("a", "c"); group.addToGroup("b", "b"); group.clear(); assertThat(group.getGroup("a")).isEmpty(); assertThat(group.getGroup("b")).isEmpty(); }