Fix bugs in test (revealed by Java 8), where the insertion order to Hash...

...Map is not guaranteed