public Map<String, Object> getConfigurationByPluginTypeOrAliases(final String pluginType, final Class<? extends Plugin> plugin) {
        Map<String, Object> configuration = getConfigurationByPluginType(pluginType);
        if (configuration.isEmpty()) {
            // let's check if the plugin-configuration was provided using type alias.
            Set<String> aliases = Plugin.getAliases(plugin);
            for (String alias: aliases) {
                configuration = getConfigurationByPluginType(alias);
                if (!configuration.isEmpty()) {
                    break; // non-empty configuration was found for a plugin alias.
                }
            }
        }
        return configuration;
    }
@Test
    void shouldGetConfigurationForAlias() {
        // Given
        Map<String, Object> config = Map.of(
            "prop1", "v1",
            "prop2", "v1",
            "prop3", "v1"
        );
        PluginConfigurations configurations = new PluginConfigurations(List.of(
            new PluginConfiguration(0, "io.kestra.core.runners.test.task.Alias", config)
        ));

        Map<String, Object> result = configurations.getConfigurationByPluginTypeOrAliases(new TaskWithAlias().getType(), TaskWithAlias.class);
        Assertions.assertEquals(config, result);
    }