@Test public void testWritingMultipleFiles() throws Exception {
      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));         
         c = in.read(readContent, 0, 3000);
         assertEquals(-1, c);
         in.close();
        
        in = store.createInputStream(start, 2048);
        c = in.read(readContent, 0, 3000);
        assertTrue(Arrays.equals(bytesOrig, readContent));
         c = in.read(readContent, 0, 3000);
         assertEquals(-1, c);
         in.close();