Added test case for index endpoint