Added test for addMapToDictionary and fix for the function as well.