Unit tests for parse_and_merge