DeleteOperator extends BaseOperator { public void setCondition(Condition condition) { this.condition = condition; }  void setCondition(Condition condition); final transient DefaultInputPort<Map<String, Object>> inport; final transient DefaultOutputPort<Map<String, Object>> outport; }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Test public void testSqlSelect() { DeleteOperator oper = new DeleteOperator(); EqualValueCondition condition = new EqualValueCondition(); condition.addEqualValue("a", 1); oper.setCondition(condition); CollectorTestSink sink = new CollectorTestSink(); oper.outport.setSink(sink); oper.setup(null); oper.beginWindow(1); HashMap<String, Object> tuple = new HashMap<String, Object>(); tuple.put("a", 0); tuple.put("b", 1); tuple.put("c", 2); oper.inport.process(tuple); tuple = new HashMap<String, Object>(); tuple.put("a", 1); tuple.put("b", 3); tuple.put("c", 4); oper.inport.process(tuple); tuple = new HashMap<String, Object>(); tuple.put("a", 1); tuple.put("b", 5); tuple.put("c", 6); oper.inport.process(tuple); oper.endWindow(); oper.teardown(); LOG.debug("{}", sink.collectedTuples); }