@Test
public void testTryStatement() {

  Parser<Statement> parser =
      StatementParser.tryStatement(StatementParser.SYSTEM_MODIFIER, SIMPLE_STATEMENT);
  TerminalParserTest.assertResult(parser, "try {foo;} catch(E e) {bar;}",
      TryStatement.class, "try {foo;} catch (E e) {bar;}");
  TerminalParserTest.assertResult(parser, "try {foo;} catch(E e) {bar;}catch(E2 e) {baz;}",
      TryStatement.class, "try {foo;} catch (E e) {bar;} catch (E2 e) {baz;}");
  TerminalParserTest.assertResult(parser, "try {foo;} finally{bar;}",
      TryStatement.class, "try {foo;} finally {bar;}");
  TerminalParserTest.assertResult(parser, "try {foo;} catch(E e){bar;}finally{bar;}",
      TryStatement.class, "try {foo;} catch (E e) {bar;} finally {bar;}");
  TerminalParserTest.assertResult(parser, "try {foo;} catch(E e){bar;}catch(E e2){bar2;}finally{bar;}",
      TryStatement.class, "try {foo;} catch (E e) {bar;} catch (E e2) {bar2;} finally {bar;}");
  TerminalParserTest.assertFailure(parser, "try{foo;}catch(E e1, E e2){bar;}", 1, 20);
}