Unit tests for index method