Access token database

Refactored the code according to the comments and added test cases.
Given that you have to come up with some cludge way of generating an integer key, why dont you consider using a HashSet instead ? Does everything you need without the need for a key for each entry.

Also, if you use a hash set, make sure to override the equals and gethashcode method for the AccessToken object.
You should search on google on how to implement these methods.