Add unit test for stale tip checking