tests for heartbeat and resendrequest.
send messages bidirectional by test.
test of heartbeat function.