Added unit test for index up and down.