public FilePath createTempDir(final String prefix, final String suffix) throws IOException, InterruptedException {
        try {
            String[] s;
            if (suffix == null || suffix.isBlank()) {
                s = new String[]{prefix, "tmp"}; // see File.createTempFile - tmp is used if suffix is null
            } else {
                s = new String[]{prefix, suffix};
            }
            String name = String.join(".", s);
            return new FilePath(this, act(new CreateTempDir(name)));
        } catch (IOException e) {
            throw new IOException("Failed to create a temp directory on " + remote, e);
        }
    }
@Issue("JENKINS-48227")
    @Test
    public void testCreateTempDir() throws IOException, InterruptedException  {
        final File srcFolder = temp.newFolder("src");
        final FilePath filePath = new FilePath(srcFolder);
        FilePath x = filePath.createTempDir("jdk", "dmg");
        FilePath y = filePath.createTempDir("jdk", "pkg");
        FilePath z = filePath.createTempDir("jdk", null);

        assertNotNull("FilePath x should not be null", x);
        assertNotNull("FilePath y should not be null", y);
        assertNotNull("FilePath z should not be null", z);

        assertTrue(x.getName().contains("jdk.dmg"));
        assertTrue(y.getName().contains("jdk.pkg"));
        assertTrue(z.getName().contains("jdk.tmp"));
    }