### Question:
LocalFileUtils { public static byte[] computeSHA256FileCheckSumViaAbsolutePath(final String absolutePathToLocalFile) throws JargonException { log.info("computeSHA256FileCheckSumViaAbsolutePath()"); if (absolutePathToLocalFile == null || absolutePathToLocalFile.isEmpty()) { throw new IllegalArgumentException("null or empty absolutePathToLocalFile"); } FileInputStream file; try { file = new FileInputStream(absolutePathToLocalFile); } catch (FileNotFoundException e1) { throw new JargonException("error computing checksum, file not found:" + absolutePathToLocalFile, e1); } MessageDigest complete; int numRead; final BufferedInputStream in = new BufferedInputStream(file); final byte[] buffer = new byte[4096]; try { complete = MessageDigest.getInstance("SHA-256"); do { numRead = in.read(buffer); if (numRead > 0) { complete.update(buffer, 0, numRead); } } while (numRead != -1); return complete.digest(); } catch (final NoSuchAlgorithmException e) { throw new JargonException("no such algorithm exception for MD5"); } catch (final Exception e) { throw new JargonException("Error computing MD5 checksum", e); } finally { try { in.close(); } catch (final IOException e) { } try { file.close(); } catch (final IOException e) { } } } private  LocalFileUtils(); static void stringToFile(final File file, final String string); static String fileContentsAsString(final File file); static String getFileExtension(final String fileName); static String normalizePath(final String inPath); static String getFileNameUpToExtension(final String fileName); static String getFileNameWithTimeStampInterposed(final String fileName); static int countFilesInDirectory(final File directory); static void createLocalFileIfNotExists(final File localFileToHoldData); static long computeCRC32FileCheckSumViaAbsolutePath(final String absolutePathToLocalFile); static byte[] computeSHA256FileCheckSumViaAbsolutePath(final String absolutePathToLocalFile); static byte[] computeMD5FileCheckSumViaAbsolutePath(final String absolutePathToLocalFile); static byte[] hexStringToByteArray(final String s); static String digestByteArrayToString(final byte[] digestAsByteArray); static File getClasspathResourceAsFile(final String resourcePath); static String getClasspathResourceFileAsString(final String resourcePath); static byte[] getBytesFromFile(final File file); static final Logger log; }### Answer:
@Test public void testGenerateSHA256Checksum() throws Exception { String testFileName = "testGenerateSHA256Checksum.txt"; String absPath = scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); String localFileName = FileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, 100); byte[] actual = LocalFileUtils.computeSHA256FileCheckSumViaAbsolutePath(localFileName); Assert.assertNotNull("no checksum", actual); }