added tests with mocks to union and merge methods