Implement and test a CreateFromMap function