Added unit test for timetravel middleware