@VisibleForTesting
    void updateConfig(
            Configuration config, ConfigOption<List<String>> configOption, List<String> newValue) {
        final List<String> originalValue =
                config.getOptional(configOption).orElse(Collections.emptyList());

        if (hasLocal(originalValue)) {
            LOG.info(
                    "Updating configuration '{}' after to replace local artifact: '{}'",
                    configOption.key(),
                    newValue);
            config.set(configOption, newValue);
        }
    }
@Test
    void testUpdateConfig() {
        List<String> artifactList =
                Arrays.asList("local:///tmp/artifact1.jar", "s3://my-bucket/artifact2.jar");
        Configuration config = new Configuration();
        config.set(ArtifactFetchOptions.ARTIFACT_LIST, artifactList);

        List<String> uploadedArtifactList = new ArrayList<>(artifactList);
        uploadedArtifactList.set(0, getTargetDirUri() + "/artifact1.jar");
        artifactUploader.updateConfig(
                config, ArtifactFetchOptions.ARTIFACT_LIST, uploadedArtifactList);

        assertThat(config.get(ArtifactFetchOptions.ARTIFACT_LIST)).isEqualTo(uploadedArtifactList);
    }