### Question:
FusionIndexPopulator extends FusionIndexBase<IndexPopulator> implements IndexPopulator { @Override public void markAsFailed( String failure ) { instanceSelector.forAll( populator -> populator.markAsFailed( failure ) ); } FusionIndexPopulator( SlotSelector slotSelector, InstanceSelector<IndexPopulator> instanceSelector, long indexId, IndexDropAction dropAction,
            boolean archiveFailedIndex ); @Override void create(); @Override void drop(); @Override void add( Collection<? extends IndexEntryUpdate<?>> updates ); @Override void verifyDeferredConstraints( NodePropertyAccessor nodePropertyAccessor ); @Override IndexUpdater newPopulatingUpdater( NodePropertyAccessor accessor ); @Override void close( boolean populationCompletedSuccessfully ); @Override void markAsFailed( String failure ); @Override void includeSample( IndexEntryUpdate<?> update ); @Override IndexSample sampleResult(); @Override Map<String,Value> indexConfig();  }### Answer:
@Test public void markAsFailedMustMarkAll() throws Exception { String failureMessage = "failure"; fusionIndexPopulator.markAsFailed( failureMessage ); for ( IndexPopulator alivePopulator : alivePopulators ) { verify( alivePopulator, times( 1 ) ).markAsFailed( failureMessage ); } }
@Test public void markAsFailedMustThrowIfAnyThrow() throws Exception { for ( IndexPopulator alivePopulator : alivePopulators ) { UncheckedIOException failure = new UncheckedIOException( new IOException( "fail" ) ); doThrow( failure ).when( alivePopulator ).markAsFailed( anyString() ); verifyCallFail( failure, () -> { fusionIndexPopulator.markAsFailed( anyString() ); return null; } ); doAnswer( invocation -> null ).when( alivePopulator ).markAsFailed( anyString() ); } }