public static Collection<FailureEnricher> getFailureEnrichers(
            final Configuration configuration) {
        final PluginManager pluginManager =
                PluginUtils.createPluginManagerFromRootFolder(configuration);
        return getFailureEnrichers(configuration, pluginManager);
    }
@Test
    public void testGetFailureEnrichers() {
        final Configuration configuration = new Configuration();
        final Collection<FailureEnricher> emptyEnrichers =
                FailureEnricherUtils.getFailureEnrichers(configuration, createPluginManager());

        // Empty -> disabled feature
        assertThat(emptyEnrichers).hasSize(0);

        // Invalid Name
        configuration.set(
                JobManagerOptions.FAILURE_ENRICHERS_LIST, FailureEnricherUtilsTest.class.getName());
        final Collection<FailureEnricher> invalidEnrichers =
                FailureEnricherUtils.getFailureEnrichers(configuration, createPluginManager());
        // Excluding failure enricher
        assertThat(invalidEnrichers).hasSize(0);

        // Valid Name plus loading
        configuration.set(JobManagerOptions.FAILURE_ENRICHERS_LIST, TestEnricher.class.getName());
        final Collection<FailureEnricher> enrichers =
                FailureEnricherUtils.getFailureEnrichers(configuration, createPluginManager());
        assertThat(enrichers).hasSize(1);
        // verify that the failure enricher was created and returned
        assertThat(enrichers)
                .satisfiesExactly(
                        enricher -> assertThat(enricher).isInstanceOf(TestEnricher.class));

        // Valid plus Invalid Name combination
        configuration.set(
                JobManagerOptions.FAILURE_ENRICHERS_LIST,
                FailureEnricherUtilsTest.class.getName() + "," + TestEnricher.class.getName());
        final Collection<FailureEnricher> validInvalidEnrichers =
                FailureEnricherUtils.getFailureEnrichers(configuration, createPluginManager());
        assertThat(validInvalidEnrichers).hasSize(1);
        assertThat(validInvalidEnrichers)
                .satisfiesExactly(
                        enricher -> assertThat(enricher).isInstanceOf(TestEnricher.class));
    }