Added merge variant with test.