public static List<Path> getQualifiedRemoteProvidedLibDirs(
            org.apache.flink.configuration.Configuration configuration,
            YarnConfiguration yarnConfiguration)
            throws IOException {

        return getRemoteSharedLibPaths(
                configuration,
                pathStr -> {
                    final Path path = new Path(pathStr);
                    return path.getFileSystem(yarnConfiguration).makeQualified(path);
                });
    }
@Test
    void testSharedLibIsNotRemotePathShouldThrowException() {
        final String localLib = "file:///flink/sharedLib";
        final Configuration flinkConfig = new Configuration();
        flinkConfig.set(YarnConfigOptions.PROVIDED_LIB_DIRS, Collections.singletonList(localLib));

        final String msg =
                "The \""
                        + YarnConfigOptions.PROVIDED_LIB_DIRS.key()
                        + "\" should only "
                        + "contain dirs accessible from all worker nodes";
        assertThatThrownBy(
                        () ->
                                Utils.getQualifiedRemoteProvidedLibDirs(
                                        flinkConfig, new YarnConfiguration()))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessageContaining(msg);
    }