Add test for proposed language extension for stateful applies