String pname = "file@" + testFile.getName();
Property p = testRoot.setProperty(pname, new FileInputStream(testFile));
testRoot.save();
// read partial
ReadableBinaryValue exv = (ReadableBinaryValue)testRoot.getProperty(pname).getValue();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int len = 200 * 1024;
int pos = 900 * 1024;
long res = exv.read(baos, len, pos);
assertEquals("Wrong bytes count have been read", len, res);
compareStream(new FileInputStream(testFile), new ByteArrayInputStream(baos.toByteArray()), pos, 0, len);
}