@Test
  public void testNegative() throws ParseException {
    expectedException.expect(ParseException.class);
    expectedException.expectMessage("line 1:74 cannot recognize input near 'INSERT' '<EOF>' '<EOF>' in WHEN MATCHED THEN clause");
    ASTNode ast = parse("MERGE INTO target USING source ON target.pk = source.pk WHEN MATCHED THEN INSERT");
  }
both UPDATE and INSERT
@throws ParseException
parser/src/test/org/apache/hadoop/hive/ql/parse/TestMergeStatement.java