Fixed test depending on hash map implementation in Java