@Test
  public void testTxnStart() throws ParseException {
    ASTNode ast = parse("START TRANSACTION");
    Assert.assertEquals("AST doesn't match",
      "tok_start_transaction", ast.toStringTree());

    ast = parse("START TRANSACTION ISOLATION LEVEL SNAPSHOT");
    Assert.assertEquals("AST doesn't match",
      "(tok_start_transaction (tok_isolation_level tok_isolation_snapshot))", ast.toStringTree());

    ast = parse("START TRANSACTION READ ONLY");
    Assert.assertEquals("AST doesn't match",
      "(tok_start_transaction (tok_txn_access_mode tok_txn_read_only))", ast.toStringTree());

    ast = parse("START TRANSACTION READ WRITE, ISOLATION LEVEL SNAPSHOT");
    Assert.assertEquals("AST doesn't match",
      "(tok_start_transaction (tok_txn_access_mode tok_txn_read_write) (tok_isolation_level tok_isolation_snapshot))", ast.toStringTree());

  }
Basic parser tests for multi-statement transactions
parser/src/test/org/apache/hadoop/hive/ql/parse/positive/TestTransactionStatement.java