@Test (timeout = 30000)
public void testCreateLocalTempFile() throws IOException {

  final File baseFile = new File(tmp, "base");
  File tmp1 = FileUtil.createLocalTempFile(baseFile, "foo", false);
  File tmp2 = FileUtil.createLocalTempFile(baseFile, "foo", true);
  assertFalse(tmp1.getAbsolutePath().equals(baseFile.getAbsolutePath()));
  assertFalse(tmp2.getAbsolutePath().equals(baseFile.getAbsolutePath()));
  assertTrue(tmp1.exists() && tmp2.exists());
  assertTrue(tmp1.canWrite() && tmp2.canWrite());
  assertTrue(tmp1.canRead() && tmp2.canRead());
  tmp1.delete();
  tmp2.delete();
  assertTrue(!tmp1.exists() && !tmp2.exists());
}