ValidateMap refactored and Junit test modified