Added tests for merging corner cases