public void run(RegressionEnvironment env) { env.compileDeploy("@name('s0') select * from SupportBean"); EPStatement statement = env.statement("s0"); env.undeployAll(); assertTrue(statement.isDestroyed()); tryInvalid(statement, stmt -> stmt.iterator()); tryInvalid(statement, stmt -> stmt.iterator(new ContextPartitionSelectorAll())); tryInvalid(statement, stmt -> stmt.safeIterator()); tryInvalid(statement, stmt -> stmt.safeIterator(new ContextPartitionSelectorAll())); tryInvalid(statement, stmt -> stmt.addListenerWithReplay(new SupportUpdateListener())); tryInvalid(statement, stmt -> stmt.addListener(new SupportUpdateListener())); tryInvalid(statement, stmt -> stmt.setSubscriber(this)); tryInvalid(statement, stmt -> stmt.setSubscriber(this, "somemethod")); } }