Some countries have integer numbers printed on the transport tickets, for example, in ex-USSR. The ticket is "happy" when the sum of the first half of digits equals to the last half one. Then you should eat it and make a wish.
In theory, hash map structure should be very fast on retrieving by key operations, close to O(1) like for an array. A sorted map (keys are sorted) should be O(log2 N) instead. The following test checks the difference.
We will use one tester class per type of tested structure. The keys are string and are generated randomly in prepared array to avoid additional checks whether the key exists or not.