Parsing heartbeat header and tests.