CreateViewStatement extends Statement { @Override public List<String> getInputViews(){ return Arrays.asList(subStatement.getId()); } 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 testCreateViewStatementBeansBuilder00() { Statement subStatement = new SelectStatement("id2", null, null, "from", null, null); CreateViewStatement createViewStatement = new CreateViewStatement("idx", subStatement); List<PredicateBase> expectedGeneratedBeans = Collections.emptyList(); List<String> dependencies = Arrays.asList(subStatement.getId()); Assert.assertEquals(createViewStatement.getInputViews(), dependencies); StatementTestUtils.assertGeneratedBeans(createViewStatement, expectedGeneratedBeans); }
@Test public void testCreateViewStatementBeansBuilder01() { ProjectPredicate projectPredicate = new ProjectSomeFieldsPredicate(Arrays.asList("x", "y")); ExtractPredicate extractPredicate = new KeywordExtractPredicate(Arrays.asList("a", "b"), "zzz", KeywordMatchingType.SUBSTRING_SCANBASED.toString()); Statement subStatement = new SelectStatement("id", projectPredicate, extractPredicate, "from", null, null); CreateViewStatement createViewStatement = new CreateViewStatement("idx", subStatement); List<PredicateBase> expectedGeneratedBeans = Collections.emptyList(); List<String> dependencies = Arrays.asList(subStatement.getId()); Assert.assertEquals(createViewStatement.getInputViews(), dependencies); StatementTestUtils.assertGeneratedBeans(createViewStatement, expectedGeneratedBeans); }