def METHOD_NAME(self):
    """
    If the connection is closed, the hang check is cancelled.
    """
    clock = Clock()
    protocol = HangCheckProtocol(
        Protocol(),
        reactor=clock,
    )
    transport = StringTransport()
    transport.protocol = protocol
    protocol.makeConnection(transport)
    protocol.connectionLost(
        Failure(ConnectionDone("Bye."))
    )
    assert_clock_idle(self, clock)