Added TDD test case for JUnit - addToIndex