### Question:
MD5LocalChecksumComputerStrategy extends AbstractChecksumComputeStrategy { @Override public ChecksumValue computeChecksumValueForLocalFile(final String localFileAbsolutePath) throws FileNotFoundException, JargonException { log.info("instanceChecksumForPackingInstruction()"); if (localFileAbsolutePath == null || localFileAbsolutePath.isEmpty()) { throw new IllegalArgumentException("null or empty localFileAbsolutePath"); } byte[] digest = LocalFileUtils.computeMD5FileCheckSumViaAbsolutePath(localFileAbsolutePath); ChecksumValue value = new ChecksumValue(); value.setBinaryChecksumValue(digest); value.setBase64ChecksumValue(Base64.encodeBase64String(digest).trim()); value.setChecksumEncoding(ChecksumEncodingEnum.MD5); value.setChecksumStringValue(LocalFileUtils.digestByteArrayToString(digest)); value.setChecksumTransmissionFormat(value.getChecksumStringValue()); value.setHexChecksumValue(Hex.encodeHexString(digest)); return value; }  @Override ChecksumValue computeChecksumValueForLocalFile(final String localFileAbsolutePath); static final Logger log; }### Answer:
@Test public void testInstanceChecksumForPackingInstruction() throws Exception { String testFileName = "testInstanceChecksumForPackingInstruction.txt"; String absPath = scratchFileUtils.createAndReturnAbsoluteScratchPath(IRODS_TEST_SUBDIR_PATH); String localFileName = FileGenerator.generateFileOfFixedLengthGivenName(absPath, testFileName, 100); byte[] expectedDigest = LocalFileUtils.computeMD5FileCheckSumViaAbsolutePath(localFileName); String expectedAsString = LocalFileUtils.digestByteArrayToString(expectedDigest); MD5LocalChecksumComputerStrategy checksumStrategy = new MD5LocalChecksumComputerStrategy(); ChecksumValue actual = checksumStrategy.computeChecksumValueForLocalFile(localFileName); Assert.assertEquals("did not compute md5 checksum and string encode it", expectedAsString, actual.getChecksumStringValue()); Assert.assertEquals("transmission value improper", expectedAsString, actual.getChecksumTransmissionFormat()); Assert.assertTrue("no binary data", actual.getBinaryChecksumValue().length > 0); Assert.assertEquals("did not correctly compute hex value", actual.getHexChecksumValue(), Hex.encodeHexString(actual.getBinaryChecksumValue())); Assert.assertEquals("did no correctly compute base64 value", actual.getBase64ChecksumValue(), Base64.encodeBase64String(actual.getBinaryChecksumValue())); }