public Result fetchArtifacts(String[] uris) {
        checkArgument(uris != null && uris.length > 0, "At least one URI is required.");

        ArtifactUtils.createMissingParents(baseDir);
        List<File> artifacts =
                Arrays.stream(uris)
                        .map(FunctionUtils.uncheckedFunction(this::fetchArtifact))
                        .collect(Collectors.toList());

        if (artifacts.size() > 1) {
            return new Result(null, artifacts);
        }

        if (artifacts.size() == 1) {
            return new Result(artifacts.get(0), null);
        }

        // Should not happen.
        throw new IllegalStateException("Corrupt artifact fetching state.");
    }
@Test
    void testNoFetchOverride() throws Exception {
        DummyFetcher dummyFetcher = new DummyFetcher();
        ArtifactFetchManager fetchMgr =
                new ArtifactFetchManager(
                        dummyFetcher, dummyFetcher, dummyFetcher, configuration, null);

        File sourceFile = TestingUtils.getClassFile(getClass());
        Path destFile = tempDir.resolve(sourceFile.getName());
        Files.copy(sourceFile.toPath(), destFile);

        String uriStr = "file://" + sourceFile.toURI().getPath();
        fetchMgr.fetchArtifacts(uriStr, null);

        assertThat(dummyFetcher.fetchCount).isZero();
    }