### Question:
HiveLanguageParser { public void parse(String statement, NodeProcessor nodeProcessor) { Context parserContext; try { parserContext = new Context(hiveConf); } catch (IOException e) { throw new RuntimeException("Unable to create Context for parser", e); } ParseDriver parserDriver = new ParseDriver(); ASTNode tree; try { tree = parserDriver.parse(statement, parserContext); } catch (ParseException e) { throw new HiveParseException(e); } Map<Rule, NodeProcessor> rules = new LinkedHashMap<>(); Dispatcher dispatcher = new DefaultRuleDispatcher(nodeProcessor, rules, null); GraphWalker walker = new DefaultGraphWalker(dispatcher); List<Node> topNodes = new ArrayList<>(); topNodes.add(tree); try { walker.startWalking(topNodes, null); } catch (SemanticException e) { throw new HiveSemanticException(e); } } HiveLanguageParser(HiveConf hiveConfiguration); void parse(String statement, NodeProcessor nodeProcessor);  }### Answer:
@SuppressWarnings("unchecked") @Test public void typical() throws Exception { parser.parse(CREATE_TABLE_STATEMENT, nodeProcessor); verify(nodeProcessor, times(49)).process(any(Node.class), any(Stack.class), any(NodeProcessorCtx.class), anyVararg()); }
@Test(expected = HiveParseException.class) public void invalidSyntax() throws Exception { parser.parse("CREATE TABLE abc () LOCATION 'path'", nodeProcessor); }