Updated unit test for removing comma after last key-value pair.