Added unit test for reset function