Fix unit test of SyncTask and HeartBeatTask.: