According to the contract, the hashCode of a map is the sum
of the hashCodes of its entries. In this case, there is only one entry.

I think the problem is that TreeMap.Entry.hashCode() uses XOR of key's and value's hash
(see code [2] below). Now XOR is associative and commutative
and therefore any two maps of maps {x = { y = value }} and {y = { x = value }}
will have identical hash code.

I perfectly understand why the Map's hashcode must be built
by an associative and commutative operation from the entries' hashes,
but we should have something more asymmetric (instead of XOR) for the entries themselves?