private void testSimpleScenario(byte[] fileData) throws IOException {
// insert
gridFS.addFile(fileData, "root", "test.dat", "text/plain");
V7File file = gridFS.getFile("root", "test.dat");
assertEquals("test.dat", file.getName());
assertEquals("text/plain", file.getContentType());
assertEquals(Arrays.toString(fileData), Arrays.toString(IOUtils
.toByteArray(file.getInputStream())));
assertEquals(fileData.length, file.getLength().intValue());
assertEquals(1, file.getVersion());
assertEquals("root", file.getParentId());
V7File root = file.getParent();
assertEquals("root", root.getId());
List<V7File> files = root.getChildren();
assertEquals(1, files.size());
// update
file.setContent("updated contents".getBytes(), "text/plain");