added unit test to verify preservation of empty attributes