Added unit test for attribute map also fixes #1
Implement attribute map fix.