GrammarDefinition { protected final void def(String name, Parser parser) { if (parsers.containsKey(name)) { throw new IllegalStateException("Duplicate production: " + name); } parsers.put(Objects.requireNonNull(name), Objects.requireNonNull(parser)); }  Parser build(); Parser build(String name);  }
@Test(expected = IllegalStateException.class) public void testDuplicateDefinition() { buggedDefinition.def("start", new EpsilonParser()); }