@SuppressWarnings("java:S5443")
    Path createJarPath() throws IOException {
        Path jarPath;
        if (jobMetaDataParameterObject.getUploadDirectoryPath() != null) {
            Path path = Paths.get(jobMetaDataParameterObject.getUploadDirectoryPath());
            // Create a new temporary file in the given directory
            jarPath = Files.createTempFile(path, jobMetaDataParameterObject.getFileName(), ".jar");
        } else {
            // Create a new temporary file in the default temporary file directory
            jarPath = Files.createTempFile(jobMetaDataParameterObject.getFileName(), ".jar");
        }
        return jarPath;
    }
@Test
    public void testGetJarPath() throws IOException {
        Path jarPath = null;
        try {
            Path path = Paths.get("target");
            Files.createDirectories(path);
            String uploadPath = path.toAbsolutePath().toString();
            when(jobMetaDataParameterObject.getUploadDirectoryPath()).thenReturn(uploadPath);
            jarPath = jobUploadStatus.createJarPath();
            assertTrue(Files.exists(jarPath));
        } finally {
            if (jarPath != null) {
                Files.delete(jarPath);
            }
        }
    }