new File(path.getAbsolutePath()).exists());
}
public void testCreateTempPathString() throws IOException {
SimpleTempStorage man = new SimpleTempStorage();
TempPath path = man.getRootTempPath().createTempPath("test_prefix");
File tmpdir = new File(System.getProperty("java.io.tmpdir"),
"test_prefix");
assertTrue(path.getAbsolutePath().startsWith(tmpdir.getAbsolutePath()));
String fileName = path.getAbsolutePath().substring(
path.getAbsolutePath().lastIndexOf(File.separatorChar) + 1);
assertTrue("Unexpected chars in file name " + fileName,
fileName.matches("^test_prefix[0-9]+$"));
assertTrue("Temp dir doesn't exist",
new File(path.getAbsolutePath()).exists());
}