### Question:
FileUtils { public static void computeGlobalHash(final FilesystemBasedDigest digest, final File file, final int length) { if (digest == null) { return; } final byte[] bytes = new byte[ZERO_COPY_CHUNK_SIZE]; int still = length; int len = Math.min(still, ZERO_COPY_CHUNK_SIZE); FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); int read = 1; while (read > 0) { read = inputStream.read(bytes, 0, len); if (read <= 0) { break; } digest.Update(bytes, 0, read); still -= read; if (still <= 0) { break; } len = Math.min(still, ZERO_COPY_CHUNK_SIZE); } } catch (final FileNotFoundException e) { } catch (final IOException e) { } finally { close(inputStream); } } private  FileUtils(); static void close(final Reader stream); static void close(final Writer stream); static void close(final InputStream stream); static void close(final OutputStream stream); static void close(final RandomAccessFile accessFile); static boolean deleteDir(final File directory); static boolean delete(final File file); static File[] copyRecursive(final File from, final File directoryTo,
                                     final boolean move); static File[] copy(final File[] from, final File directoryTo,
                            final boolean move); static boolean createDir(final File directory); static void copy(final File from, final File to, final boolean move,
                          final boolean append); static boolean forceDeleteRecursiveDir(final File directory); static boolean deleteRecursiveDir(final File directory); static boolean fileExist(final String fileName, final String path); static File[] getFiles(final File directory); static void computeGlobalHash(final FilesystemBasedDigest digest,
                                       final File file, final int length); static File[] getFiles(final File directory,
                                final FilenameFilter filter); static long uncompressedBz2File(final File fileIn,
                                         final File fileOut); static long copy(final InputStream from, final OutputStream to); static final int ZERO_COPY_CHUNK_SIZE; }### Answer:
@Test public void computeGlobalHash() throws IOException, NoSuchAlgorithmException { generateFiles(); FilesystemBasedDigest digest = new FilesystemBasedDigest(DigestAlgo.SHA512); FileUtils.computeGlobalHash(digest, file1, (int) file1.length()); FilesystemBasedDigest digest2 = new FilesystemBasedDigest(DigestAlgo.SHA512); FileUtils.computeGlobalHash(digest2, file1, (int) file1.length() - 10); assertFalse( FilesystemBasedDigest.digestEquals(digest.Final(), digest2.Final())); }