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 testMissingRequiredFetchArgs() {
        ArtifactFetchManager fetchMgr = new ArtifactFetchManager(configuration);
        assertThatThrownBy(() -> fetchMgr.fetchArtifacts(null, null))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessage("The jobUri is required.");

        assertThatThrownBy(() -> fetchMgr.fetchArtifacts(null))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessage("At least one URI is required.");

        assertThatThrownBy(() -> fetchMgr.fetchArtifacts(new String[0]))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessage("At least one URI is required.");
    }