mapWriter
Add a test for mapWriter