out.close();
}
// Run the input file through the FifoBuffer and back into another file
final Md5CalculatingInputStream in = new Md5CalculatingInputStream(new FileInputStream(inputFile), null);
final Md5CalculatingOutputStream out = new Md5CalculatingOutputStream(new FileOutputStream("/dev/null"), null);
final PrintStream outStream = new PrintStream(out);
final FifoBuffer buffer = new FifoBuffer(in, outStream);
buffer.BUFFER_SIZE = 128 * 1024 * 1024;
buffer.doWork();
in.close();
out.close();
final String inputMd5 = in.md5();
final String outputMd5 = out.md5();
Assert.assertEquals(outputMd5, inputMd5, "MD5s do not match between input and output.");
inputFile.delete();
}