Add helper for testing session close events.