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