### Question:
Files { public static void ensureDir(final String dir) { ensureDir(dir, false); }  static void ensureDir(final String dir); static void ensureDir(final String dir, final boolean checkWrite); static void ensureDir(final File dir); static void ensureDir(final File dir, final boolean checkWrite); static String checkDir(final String dir); static String checkDir(final String dir, final boolean checkWrite); static String checkDir(final File dir); static String checkDir(final File dir, final boolean checkWrite); static String checkFile(final File file, final boolean checkWrite); static void ensureMv(final String src, final String dest); static void ensureMv(final String src, final String dest, final boolean overwrite); static void ensureMv(final File src, final File dest); static void ensureMv(final File src, final File dest, final boolean overwrite); static String mv(final String src, final String dest); static String mv(final String src, final String dest, final boolean overwrite); static String mv(final File src, final File dest); static String mv(final File src, final File dest, final boolean overwrite); static File tmpDir();  }### Answer:
@Test(expected = IllegalStateException.class) public void testEnsureDirException() throws Exception { File file = mock(File.class); expect(file.exists()).andReturn(false); expect(file.mkdirs()).andReturn(false); replay(file); Files.ensureDir(file); }
@Test public void testEnsureDirString() throws Exception { Files.ensureDir("file"); }