}
@Test
public void testCalculateIndexInclusion_RepoBasedExclusion() {
IndexRecordFilterData indexFilterData = mock(IndexRecordFilterData.class);
IndexInfo inclusionA = createMockIndexInfo("includeA", true);
IndexInfo inclusionB = createMockIndexInfo("includeButNotInThisRepo", true);
when(inclusionB.getRepositoryName()).thenReturn("someOtherRepo");
IndexInfo exclusion = createMockIndexInfo("exclude", false);
when(indexesInfo.getIndexInfos()).thenReturn(Lists.newArrayList(inclusionA, inclusionB, exclusion));
indexFilterHook.calculateIndexInclusion(RepoAndTableUtil.DEFAULT_REPOSITORY,
Table.RECORD.name, oldRecord, newRecord, indexFilterData);