FileUtility { public static boolean isCheckFileExist() { return checkFileExist; }  static void copyFile(String srcFile, String newFile); static void deleteFile(String srcFile); static void mergeFile(List<String> fileList, String newFile); static void renameFile(String srcFile, String newFile); static boolean isCheckFileExist(); static void setCheckFileExist(boolean checkFileExist);  }
@Test public void testIsCheckFileExist01() throws Exception { Field field = FileUtility.class.getDeclaredField("checkFileExist"); field.setAccessible(true); field.set(FileUtility.class, false); boolean result = FileUtility.isCheckFileExist(); assertFalse(result); }