### Question:
ParseFileUtils { public static String readFileToString(File file, Charset encoding) throws IOException { return new String(readFileToByteArray(file), encoding); }  static byte[] readFileToByteArray(File file); static FileInputStream openInputStream(File file); static void writeByteArrayToFile(File file, byte[] data); static FileOutputStream openOutputStream(File file); static void moveFile(final File srcFile, final File destFile); static void copyFile(final File srcFile, final File destFile); static void copyFile(final File srcFile, final File destFile,
                              final boolean preserveFileDate); static void deleteDirectory(final File directory); static boolean deleteQuietly(final File file); static void cleanDirectory(final File directory); static void forceDelete(final File file); static boolean isSymlink(final File file); static String readFileToString(File file, Charset encoding); static String readFileToString(File file, String encoding); static void writeStringToFile(File file, String string, Charset encoding); static void writeStringToFile(File file, String string, String encoding); static JSONObject readFileToJSONObject(File file); static void writeJSONObjectToFile(File file, JSONObject json); static final long ONE_KB; static final long ONE_MB; }### Answer:
@Test public void testReadFileToString() throws Exception { File file = temporaryFolder.newFile("file.txt"); BufferedOutputStream out = null; try { out = new BufferedOutputStream(new FileOutputStream(file)); out.write(TEST_STRING.getBytes("UTF-8")); } finally { ParseIOUtils.closeQuietly(out); } assertEquals(TEST_STRING, ParseFileUtils.readFileToString(file, "UTF-8")); }