Adding new method and unit test.

listHashMapToObject