wrote a unit test for turning attributes into key-value pairs with order property