@@ -0,0 +1,1426 @@
+package org.ihtsdo.otf.utils;%0A%0Aimport org.ihtsdo.otf.utils.FileUtils;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.net.URISyntaxException;%0Aimport java.net.URL;%0Aimport java.security.NoSuchAlgorithmException;%0A%0Apublic class FileUtilsTest %7B%0A%0A%09@Test%0A%09public void test() throws URISyntaxException, NoSuchAlgorithmException, IOException %7B%0A%09%09String testFilePath = %22org/ihtsdo/otf/utils/der2_Refset_SimpleDelta_INT_20140831.txt%22;%0A%09%09URL testFileURL = getClass().getResource(testFilePath);%0A%09%09File testFile = new File(testFileURL.toURI());%0A%09%09%0A%09%09//Normal command line utils use a hex format - base 16%0A%09%09String md5 = FileUtils.calculateMD5(testFile);%0A%09%09Assert.assertNotNull(md5);%0A%09%09%0A%09%09//If we're running on Unix, we can compare that to the stock method of generating an MD5 %0A%09%09//This would need Apache Commons Exec and it's such a bad idea that I'm not going to do it.%0A%09%09//Have copied MD5 generated from the Mac command line instead.%0A%09%09Assert.assertEquals (%22c56243ebe22a12dba48b023daf3e2937%22, md5);%0A%09%09/*%0A%09%09if (SystemUtils.IS_OS_UNIX) %7B%0A%09%09%09String line = %22md5 %22 + testFile.getAbsolutePath();%0A%09%09%09CommandLine cmdLine = CommandLine.parse(line);%0A%09%09%09ByteArrayOutputStream output = new ByteArrayOutputStream();%0A%09%09%09executor.setStreamHandler(new PumpStreamHandler(output));%0A%09%09%09DefaultExecutor executor = new DefaultExecutor();%0A%09%09%09int exitValue = executor.execute(cmdLine);%0A%09%09%7D*/%0A%09%7D%0A%0A%7D%0A

include test class for utils also