Add an events based unit test to validate that open and close work as expected