added test for mergeObjects