[union] Added unit test for sorting of Union collecting and made it pass