### Question:
Parser { protected boolean loadTables(File file) throws IOException { if (file == null) { throw new IOException(FormatHelper.formatMessage("messages", "error.cgt_missing")); } return loadTables(toInputStream(file)); } Parser(); String about(); String getAttribute(String name); String getAttribute(String name, String defaultValue); void setAttribute(String name, String value); Position getCurrentPosition(); Reduction getCurrentReduction(); SymbolList getExpectedSymbols(); Position getPosition(); void setTrimReductions(boolean value); static final String ABOUT; static final String AUTHOR; static final String CASE_SENSITIVE; static final String CHARACTER_MAPPING; static final String CHARACTER_SET; static final String GENERATED_BY; static final String GENERATED_DATE; static final String NAME; static final String START_SYMBOL; static final String VERSION; static final String PARSER_NAME; static final String PARSER_VERSION; }### Answer:
@Test public void testLoadTables_File_EGT() throws Exception { TestParser parser = new TestParser(); assertTrue("should have loaded tables", parser.loadTables(new File("src/test/resources/parser/Simple2.egt"))); validateLoadTable(parser); }
@Test public void testLoadTables_InputStream() throws Exception { TestParser parser = new TestParser(); InputStream is = new FileInputStream("src/test/resources/parser/Simple2.cgt"); assertTrue("should have loaded tables", parser.loadTables(is)); validateLoadTable(parser); }
@Test public void testLoadTables_File_CGT() throws Exception { TestParser parser = new TestParser(); assertTrue("should have loaded tables", parser.loadTables(new File("src/test/resources/parser/Simple2.cgt"))); validateLoadTable(parser); }