### Question:
TableProcessor implements NodeProcessor { @Override public Object process(Node node, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { ASTNode astNode = (ASTNode) node; if (astNode.getToken() != null && astNode.getToken().getText() != null) { if ("TOK_TABNAME".equals(astNode.getToken().getText())) { tables.add(extractTableName(astNode)); } } return null; }  @Override Object process(Node node, Stack<Node> stack, NodeProcessorCtx procCtx, Object... nodeOutputs); List<String> getTables();  }### Answer:
@Test(expected = NullPointerException.class) public void unqualifiedTableNameFailsIsSessionIsNotSet() throws Exception { ArrayList<Node> children = new ArrayList<>(); children.add(tableNode); when(node.getChildren()).thenReturn(children); when(node.getChildCount()).thenReturn(children.size()); when(node.getChild(0)).thenReturn(tableNode); when(node.getType()).thenReturn(HiveParser.TOK_TABNAME); when(token.getText()).thenReturn("TOK_TABNAME"); processor.process(node, null, null); }