@Test
public void testCreateTempFile() throws IOException {

  File f = FileUtil.createTempFile("foo", ".bar");
  f.deleteOnExit();
  String matchPat = FileUtil.getBaseDir() + ".*foo.*\\.bar";
  assertTrue(f.getAbsolutePath().matches(matchPat));
}