HashMap: put implementation and unit testing