FileStorageManager sm = getStorageManager(1024, null, null);
String tsID = "0"; //$NON-NLS-1$
// Add one batch
FileStore store = sm.createFileStore(tsID);
String contentOrig = new String("some file content this will stored in same tmp file with another");
OutputStream out = store.createOutputStream();
out.write(contentOrig.getBytes(), 0, contentOrig.getBytes().length);
out.close();
out = store.createOutputStream();
long start = store.getLength();
byte[] bytesOrig = new byte[2048];
r.nextBytes(bytesOrig);
out.write(bytesOrig, 0, 2048);
byte[] readContent = new byte[2048];
InputStream in = store.createInputStream(0, contentOrig.getBytes().length);
int c = in.read(readContent, 0, 3000);
assertEquals(contentOrig, new String(readContent, 0, c));