Refactor MapUtil