Move map to object, unit tests