Improved TDD Testing code for executeAddToIndex to provide a more useful test result