public static String getTempDir(String prefix) throws IOException {
    File tempDir = Files.createTempDirectory(prefix + RANDOM.nextInt(1000)).toFile();
    tempDir.deleteOnExit();
    return tempDir.getAbsolutePath();
  }
Gets a temporary directory with the given prefix. The directory will be deleted when the virtual machine terminates.
@param prefix The prefix for the name of the temporary directory.
@return The absolute path of the generated temporary directory.
@throws IOException
ambry-test-utils/src/main/java/com/github/ambry/utils/TestUtils.java