Add Unit test for HeartbeatMonitor