### Question:
PopulatingIndexProxy implements IndexProxy { @Override public void close() { job.cancelPopulation( indexPopulation ); } PopulatingIndexProxy( CapableIndexDescriptor capableIndexDescriptor, IndexPopulationJob job, MultipleIndexPopulator.IndexPopulation indexPopulation ); @Override void start(); @Override IndexUpdater newUpdater( final IndexUpdateMode mode ); @Override void drop(); @Override CapableIndexDescriptor getDescriptor(); @Override InternalIndexState getState(); @Override void force( IOLimiter ioLimiter ); @Override void refresh(); @Override void close(); @Override IndexReader newReader(); @Override boolean awaitStoreScanCompleted( long time, TimeUnit unit ); @Override void activate(); @Override void validate(); @Override void validateBeforeCommit( Value[] tuple ); @Override ResourceIterator<File> snapshotFiles(); @Override Map<String,Value> indexConfig(); @Override IndexPopulationFailure getPopulationFailure(); @Override PopulationProgress getIndexPopulationProgress(); @Override String toString();  }### Answer:
@Test public void cancelPopulationJobOnClose() { populatingIndexProxy.close(); verify( indexPopulationJob ).cancelPopulation( indexPopulation ); }