Test preserve context in asEventStream() optional function