[#76261684] Test that HandleChannelClose() is called

Test that `connection.HandleChannelClose()` is called on recoverable errors.

* * *

Also, simplify one of the related tests to avoid a type assertion.