public void addShipFiles(List<Path> shipFiles) {
        checkArgument(
                !isUsrLibDirIncludedInShipFiles(shipFiles, yarnConfiguration),
                "User-shipped directories configured via : %s should not include %s.",
                YarnConfigOptions.SHIP_FILES.key(),
                ConfigConstants.DEFAULT_FLINK_USR_LIB_DIR);
        this.shipFiles.addAll(shipFiles);
    }
@Test
    void testDisableSystemClassPathIncludeUserJarAndWithIllegalShipDirectoryName() {
        final Configuration configuration = new Configuration();
        configuration.set(CLASSPATH_INCLUDE_USER_JAR, YarnConfigOptions.UserJarInclusion.DISABLED);

        final YarnClusterDescriptor yarnClusterDescriptor =
                createYarnClusterDescriptor(configuration);
        java.nio.file.Path p = temporaryFolder.resolve(ConfigConstants.DEFAULT_FLINK_USR_LIB_DIR);
        p.toFile().mkdir();
        assertThatThrownBy(
                        () ->
                                yarnClusterDescriptor.addShipFiles(
                                        Collections.singletonList(new Path(p.toString()))))
                .isInstanceOf(IllegalArgumentException.class)
                .hasMessageContaining("User-shipped directories configured via :");
    }