List<DocumentFile<MemoryType>> l = new ArrayList<DocumentFile<MemoryType>>();
l.add(documentFile);
io.insert(md, l);
/* First of all, we should be able to fetch the attachment */
DocumentFile outputDocFile = io.getDocumentFile(md, documentFile.getFileName());
assertNotNull(outputDocFile);
/* And it should have the correct data */
byte[] outputData = IOUtils.toByteArray(outputDocFile.getStream());
assertArrayEquals(inputData, outputData);
/* We have changed the state of the documentFile we sent in (for better or worse) */
assertEquals(md.getID(), documentFile.getDocumentId());