Added tests to cover onceHostEvent and onceAfterHostEvent methods.