CreateViewStatement extends Statement { public Statement getSubStatement() { return subStatement; } CreateViewStatement();  CreateViewStatement(String id, Statement subStatement); Statement getSubStatement(); void setSubStatement(Statement subStatement); @Override String getInputNodeID(); @Override String getOutputNodeID(); @Override List<PredicateBase> getInternalOperatorBeans(); @Override List<OperatorLink> getInternalLinkBeans(); @Override List<String> getInputViews(); @Override boolean equals(Object obj);  }
@Test public void testConstructorAndGetters() { Statement subStatement; ProjectPredicate projectPredicate; ExtractPredicate extractPredicate; CreateViewStatement createViewStatement; createViewStatement = new CreateViewStatement(null, null); Assert.assertEquals(createViewStatement.getId(), null); createViewStatement = new CreateViewStatement("statementId", null); Assert.assertEquals(createViewStatement.getId(), "statementId"); createViewStatement = new CreateViewStatement("id6", null); Assert.assertEquals(createViewStatement.getId(), "id6"); createViewStatement = new CreateViewStatement("_sid12", null); Assert.assertEquals(createViewStatement.getId(), "_sid12"); createViewStatement = new CreateViewStatement("statementId", null); Assert.assertEquals(createViewStatement.getSubStatement(), null); subStatement = new SelectStatement("substatementId0", null, null, "source", null, null); createViewStatement = new CreateViewStatement("statementId", subStatement); Assert.assertEquals(createViewStatement.getSubStatement(), subStatement); subStatement = new SelectStatement("substatementId1", null, null, "table", null, null); createViewStatement = new CreateViewStatement("statementId", subStatement); Assert.assertEquals(createViewStatement.getSubStatement(), subStatement); projectPredicate = new ProjectAllFieldsPredicate(); subStatement = new SelectStatement("substatementId2", projectPredicate, null, "from", null, null); createViewStatement = new CreateViewStatement("statementId", subStatement); Assert.assertEquals(createViewStatement.getSubStatement(), subStatement); projectPredicate = new ProjectSomeFieldsPredicate(Arrays.asList("at1", "at0")); extractPredicate = new KeywordExtractPredicate(Arrays.asList("a", "b"), "keyword", KeywordMatchingType.CONJUNCTION_INDEXBASED.toString()); subStatement = new SelectStatement("substatementIdX", projectPredicate, extractPredicate, "t", null, null); createViewStatement = new CreateViewStatement("statementId", subStatement); Assert.assertEquals(createViewStatement.getSubStatement(), subStatement); }