GrammarDefinition { protected final void redef(String name, Parser parser) { if (!parsers.containsKey(name)) { throw new IllegalStateException("Undefined production: " + name); } parsers.put(Objects.requireNonNull(name), Objects.requireNonNull(parser)); }  Parser build(); Parser build(String name);  }
@Test(expected = IllegalStateException.class) public void testUnknownRedefinitionFunction() { buggedDefinition.redef("unknown", (start) -> new EpsilonParser()); }
@Test(expected = IllegalStateException.class) public void testUnknownRedefinition() { buggedDefinition.redef("unknown", new EpsilonParser()); }