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 testMixedArtifactFetch() throws Exception {
        File sourceFile = TestingUtils.getClassFile(getClass());
        String uriStr = "file://" + sourceFile.toURI().getPath();
        File sourceFile2 = getFlinkClientsJar();
        String uriStr2 = "file://" + sourceFile2.toURI().getPath();

        ArtifactFetchManager fetchMgr = new ArtifactFetchManager(configuration);
        ArtifactFetchManager.Result res = fetchMgr.fetchArtifacts(new String[] {uriStr, uriStr2});
        assertThat(res.getJobJar()).isNull();
        assertThat(res.getArtifacts()).hasSize(2);
        assertFetchedFile(res.getArtifacts().get(0), sourceFile);
        assertFetchedFile(res.getArtifacts().get(1), sourceFile2);
    }