Add UT for heartbeat.
Add UT for heartbeat failure.
Add close method in RpcClient.