public static List<TierFactory> initializeTierFactories(Configuration configuration) {
        String externalTierFactoryClass =
                configuration.get(
                        NettyShuffleEnvironmentOptions
                                .NETWORK_HYBRID_SHUFFLE_EXTERNAL_REMOTE_TIER_FACTORY_CLASS_NAME);
        if (externalTierFactoryClass != null) {
            return Collections.singletonList(
                    createExternalTierFactory(configuration, externalTierFactoryClass));
        } else {
            return getEphemeralTierFactories(configuration);
        }
    }
@Test
    void testInitDurableExternalRemoteTierWithHigherPriority() {
        Configuration configuration = new Configuration();
        configuration.set(
                NettyShuffleEnvironmentOptions.NETWORK_HYBRID_SHUFFLE_REMOTE_STORAGE_BASE_PATH,
                tmpDir.toString());
        configuration.set(
                NettyShuffleEnvironmentOptions
                        .NETWORK_HYBRID_SHUFFLE_EXTERNAL_REMOTE_TIER_FACTORY_CLASS_NAME,
                ExternalRemoteTierFactory.class.getName());
        List<TierFactory> tierFactories =
                TierFactoryInitializer.initializeTierFactories(configuration);
        assertThat(tierFactories).hasSize(1);
        assertThat(tierFactories.get(0)).isInstanceOf(ExternalRemoteTierFactory.class);
    }