Parser { public AstNode parse(CharSequence input) { return parse(new Input(checkNotNull(input))); }  AstNode parse(CharSequence input);  }
@Test public void testParse() { if (correct) { assertEquals(pattern, new Parser().parse(pattern).toString()); } else { try { new Parser().parse(pattern); fail("Expecting an exception for pattern: " + pattern); } catch (IllegalArgumentException ignore) { } } }