ClusterState contains Enrich Policy metadata information, that can be useful to other plugins.
As of now, ClusterState metadata contains [EnrichMetadata](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichMetadata.java) objects, that contain [EnrichPolicy](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/enrich/EnrichPolicy.java) objects.
While `EnrichPolicy` class is in `core`, `EnrichMetadata` is in `enrich` plugin, so it's practically impossible to access EnrichPolicy information without creating a dependency from `enrich` plugin.
It would be good to have an interface in core to avoid this dependency.
x-pack/plugin/enrich/src/test/java/org/elasticsearch/xpack/enrich/EnrichPolicyExecutorTests.java
};
        
        final EnrichPolicyLocks enrichPolicyLocks = new EnrichPolicyLocks();
        final EnrichPolicyExecutor testExecutor = new EnrichPolicyExecutor(
            Settings.EMPTY,
            null,
            client,
            testThreadPool,
            TestIndexNameExpressionResolver.newInstance(testThreadPool.getThreadContext()),
            enrichPolicyLocks,
            ESTestCase::randomNonNegativeLong
        );
        
        PlainActionFuture<ExecuteEnrichPolicyAction.Response> firstTaskResult = PlainActionFuture.newFuture();
        testExecutor.coordinatePolicyExecution(
            new ExecuteEnrichPolicyAction.Request(testPolicyName).setWaitForCompletion(false),
            firstTaskResult
        );
        
        if (enrichPolicyLocks.lockedPolices().contains(testPolicyName) == false) {
            
            clientBlockingLatch.countDown();
            try {
                firstTaskResult.get(3, TimeUnit.SECONDS);
            } catch (Exception e) {
                logger.error("Encountered ignorable exception during test cleanup");
            }
            try {
                
                getTaskActionBlockingBarrier.await(3, TimeUnit.SECONDS);