### Question:
FileUtils { public static File createTempFile(String prefix, String suffix) throws IOException { return createTempFile(prefix, suffix, null, false); } private  FileUtils(); static boolean isValidFileName(String name); static synchronized File getDefaultTempDir(); static synchronized void maybeDeleteDefaultTempDir(); static File createTmpDir(); static File createTmpDir(boolean addHook); static void mkDir(File dir); static void removeDir(File d); static void delete(File f); static void delete(File f, boolean inShutdown); static File createTempFile(String prefix, String suffix); static File createTempFile(String prefix, String suffix, File parentDir,
                               boolean deleteOnExit); static List<File> getFilesUsingSuffix(File dir, final String suffix); static List<File> getFilesRecurseUsingSuffix(File dir, final String suffix); static List<File> getFiles(File dir, final String pattern); static List<String> readLines(File file); static boolean exists(File file); static String stripPath(String name);  }### Answer:
@Test public void testTempIODirExists() throws Exception { String originaltmpdir = System.getProperty("java.io.tmpdir"); try { System.setProperty("java.io.tmpdir", "dummy"); FileUtils.createTempFile("foo", "bar"); } catch (RuntimeException e) { assertTrue(e.toString().contains("please set java.io.tempdir to an existing directory")); } finally { System.setProperty("java.io.tmpdir", originaltmpdir); } }