### Question:
FusionIndexAccessor extends FusionIndexBase<IndexAccessor> implements IndexAccessor { @Override public boolean consistencyCheck( ReporterFactory reporterFactory ) { return FusionIndexBase.consistencyCheck( instanceSelector.instances.values(), reporterFactory ); } FusionIndexAccessor( SlotSelector slotSelector,
            InstanceSelector<IndexAccessor> instanceSelector,
            StoreIndexDescriptor descriptor,
            IndexDropAction dropAction ); @Override void drop(); @Override IndexUpdater newUpdater( IndexUpdateMode mode ); @Override void force( IOLimiter ioLimiter ); @Override void refresh(); @Override void close(); @Override IndexReader newReader(); @Override BoundedIterable<Long> newAllEntriesReader(); @Override ResourceIterator<File> snapshotFiles(); @Override Map<String,Value> indexConfig(); @Override void verifyDeferredConstraints( NodePropertyAccessor nodePropertyAccessor ); @Override boolean isDirty(); @Override void validateBeforeCommit( Value[] tuple ); @Override boolean consistencyCheck( ReporterFactory reporterFactory );  }### Answer:
@Test public void mustCheckConsistencyOnAllAliveAccessors() { for ( IndexAccessor accessor : aliveAccessors ) { when( accessor.consistencyCheck( any( ReporterFactory.class ) ) ).thenReturn( true ); } assertTrue( fusionIndexAccessor.consistencyCheck( ReporterFactories.noopReporterFactory() ) ); for ( IndexAccessor accessor : aliveAccessors ) { verify( accessor, times( 1 ) ).consistencyCheck( any( ReporterFactory.class ) ); } }
@Test public void mustFailConsistencyCheckIfOneAliveAccessorFails() { for ( IndexAccessor failingAccessor : aliveAccessors ) { for ( IndexAccessor accessor : aliveAccessors ) { if ( accessor == failingAccessor ) { when( failingAccessor.consistencyCheck( any( ReporterFactory.class ) ) ).thenReturn( false ); } else { when( failingAccessor.consistencyCheck( any( ReporterFactory.class ) ) ).thenReturn( true ); } } assertFalse( fusionIndexAccessor.consistencyCheck( ReporterFactories.noopReporterFactory() ) ); resetMocks(); } }