@VisibleForTesting
    ArtifactFetcher getFetcher(URI uri) {
        if ("local".equals(uri.getScheme())) {
            return localFetcher;
        }

        if (isRawHttp(uri.getScheme()) || "https".equals(uri.getScheme())) {
            return httpFetcher;
        }

        return fsFetcher;
    }
@Test
    void testGetFetcher() throws Exception {
        configuration.set(ArtifactFetchOptions.RAW_HTTP_ENABLED, true);
        ArtifactFetchManager fetchManager = new ArtifactFetchManager(configuration);

        ArtifactFetcher fetcher = fetchManager.getFetcher(new URI("local:///a.jar"));
        assertThat(fetcher).isInstanceOf(LocalArtifactFetcher.class);

        fetcher = fetchManager.getFetcher(new URI("http://0.0.0.0:123/a.jar"));
        assertThat(fetcher).isInstanceOf(HttpArtifactFetcher.class);

        fetcher = fetchManager.getFetcher(new URI("https://0.0.0.0:123/a.jar"));
        assertThat(fetcher).isInstanceOf(HttpArtifactFetcher.class);

        fetcher = fetchManager.getFetcher(new URI("hdfs:///tmp/a.jar"));
        assertThat(fetcher).isInstanceOf(FsArtifactFetcher.class);

        fetcher = fetchManager.getFetcher(new URI("s3a:///tmp/a.jar"));
        assertThat(fetcher).isInstanceOf(FsArtifactFetcher.class);
    }