Add test for findCommonIndexes function