The removeFirstNamesDuplicate requirement should have a better explanation of why the requirement is not met. Please someone explain what I am doing wrong
public static void removeFirstNameDuplicates(Map<String, String> map) {
HashMap<String, String> cloneMap = new HashMap<String, String>(map);
for (Map.Entry<String, String> kv : cloneMap.entrySet()) {
removeItemFromMapByValue(map, kv.getValue());
}
for (Map.Entry<String, String> kv : cloneMap.entrySet()) {
if (!map.containsValue(kv.getValue())) {
map.put(kv.getKey(), kv.getValue());
}
}
}