void (@NotNull BiConsumer<@NotNull IndexingTestEntity, @NotNull WorkspaceFileSetRegistrar> biConsumer) { WorkspaceFileIndexContributor<IndexingTestEntity> contributor = new WorkspaceFileIndexContributor<>() { @Override public void registerFileSets(@NotNull IndexingTestEntity entity, @NotNull WorkspaceFileSetRegistrar registrar, @NotNull EntityStorage storage) { biConsumer.accept(entity, registrar); } @NotNull @Override public Class<IndexingTestEntity> getEntityClass() { return IndexingTestEntity.class; } }; ServiceContainerUtil.registerExtension(ApplicationManager.getApplication(), WorkspaceFileIndexImpl.Companion.getEP_NAME(), contributor, getTestRootDisposable()); }