hashmap implement and unit test