### Question:
GenericNativeIndexAccessor extends NativeIndexAccessor<GenericKey,NativeIndexValue> { @Override public void drop() { super.drop(); dropAction.drop( descriptor.getId(), false ); } GenericNativeIndexAccessor( PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout<GenericKey,NativeIndexValue> layout,
            RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor,
            IndexSpecificSpaceFillingCurveSettingsCache spaceFillingCurveSettings, SpaceFillingCurveConfiguration configuration, IndexDropAction dropAction,
            boolean readOnly ); @Override void drop(); @Override IndexReader newReader(); @Override void validateBeforeCommit( Value[] tuple ); @Override void force( IOLimiter ioLimiter ); @Override Map<String,Value> indexConfig();  }### Answer:
@Test public void dropShouldDeleteEntireIndexFolder() { File root = storage.directory().directory( "root" ); IndexDirectoryStructure directoryStructure = IndexDirectoryStructure.directoriesByProvider( root ).forProvider( GenericNativeIndexProvider.DESCRIPTOR ); long indexId = 8; File indexDirectory = directoryStructure.directoryForIndex( indexId ); File indexFile = new File( indexDirectory, "my-index" ); StoreIndexDescriptor descriptor = IndexDescriptorFactory.forSchema( SchemaDescriptorFactory.forLabel( 1, 1 ) ).withId( indexId ); IndexSpecificSpaceFillingCurveSettingsCache spatialSettings = mock( IndexSpecificSpaceFillingCurveSettingsCache.class ); FileSystemAbstraction fs = storage.fileSystem(); IndexDropAction dropAction = new FileSystemIndexDropAction( fs, directoryStructure ); GenericNativeIndexAccessor accessor = new GenericNativeIndexAccessor( storage.pageCache(), fs, indexFile, new GenericLayout( 1, spatialSettings ), immediate(), EMPTY, descriptor, spatialSettings, mock( SpaceFillingCurveConfiguration.class ), dropAction, false ); accessor.drop(); assertFalse( fs.fileExists( indexDirectory ) ); }