### Question:
IndexingService extends LifecycleAdapter implements IndexingUpdateService, IndexingProvidersService { public void activateIndex( long indexId ) throws IndexNotFoundKernelException, IndexActivationFailedKernelException, IndexPopulationFailedKernelException { try { if ( state == State.RUNNING ) { IndexProxy index = getIndexProxy( indexId ); index.awaitStoreScanCompleted( 0, TimeUnit.MILLISECONDS ); index.activate(); internalLog.info( "Constraint %s is %s.", index.getDescriptor(), ONLINE.name() ); } } catch ( InterruptedException e ) { Thread.interrupted(); throw new IndexActivationFailedKernelException( e, "Unable to activate index, thread was interrupted." ); } } IndexingService( IndexProxyCreator indexProxyCreator,
            IndexProviderMap providerMap,
            IndexMapReference indexMapRef,
            IndexStoreView storeView,
            Iterable<SchemaRule> schemaRules,
            IndexSamplingController samplingController,
            TokenNameLookup tokenNameLookup,
            JobScheduler scheduler,
            SchemaState schemaState,
            MultiPopulatorFactory multiPopulatorFactory,
            LogProvider internalLogProvider,
            LogProvider userLogProvider,
            Monitor monitor,
            boolean readOnly ); @Override void init(); @Override void start(); @Override void shutdown(); DoubleLongRegister indexUpdatesAndSize( SchemaDescriptor descriptor ); double indexUniqueValuesPercentage( SchemaDescriptor descriptor ); @Override void validateBeforeCommit( SchemaDescriptor index, Value[] tuple ); @Override IndexDescriptor getBlessedDescriptorFromProvider( IndexDescriptor index ); @Override IndexProviderDescriptor indexProviderByName( String providerName ); @Override void apply( IndexUpdates updates ); @Override Iterable<IndexEntryUpdate<SchemaDescriptor>> convertToIndexUpdates( EntityUpdates entityUpdates, EntityType type ); void createIndexes( StoreIndexDescriptor... rules ); void createIndexes( boolean verifyBeforeFlipping, StoreIndexDescriptor... rules ); void dropIndex( StoreIndexDescriptor rule ); void putConstraint( ConstraintRule rule ); void removeConstraint( long ruleId ); void triggerIndexSampling( IndexSamplingMode mode ); void triggerIndexSampling( SchemaDescriptor descriptor, IndexSamplingMode mode ); void activateIndex( long indexId ); IndexProxy getIndexProxy( long indexId ); IndexProxy getIndexProxy( SchemaDescriptor descriptor ); long getIndexId( SchemaDescriptor descriptor ); void validateIndex( long indexId ); void forceAll( IOLimiter limiter ); LongSet getIndexIds(); ResourceIterator<File> snapshotIndexFiles(); Collection<SchemaDescriptor> getRelatedIndexes( long[] labels, int propertyKeyId, EntityType entityType ); Collection<SchemaDescriptor> getRelatedIndexes( long[] labels, int[] propertyKeyIds, EntityType entityType ); Collection<IndexBackedConstraintDescriptor> getRelatedUniquenessConstraints( long[] labels, int propertyKeyId, EntityType entityType ); Collection<IndexBackedConstraintDescriptor> getRelatedUniquenessConstraints( long[] labels, int[] propertyKeyIds, EntityType entityType ); boolean hasRelatedSchema( long[] labels, int propertyKey, EntityType entityType ); boolean hasRelatedSchema( int label, EntityType entityType ); static final Monitor NO_MONITOR; }### Answer:
@Test public void shouldIgnoreActivateCallDuringRecovery() throws Exception { IndexingService indexingService = newIndexingServiceWithMockedDependencies( populator, accessor, withData() ); indexingService.activateIndex( 0 ); }