AppendingFsWorker extends StandardWorker { @Override public void put(byte[] data, File file) throws FsException { try (OutputStream out = new FileOutputStream(file, true)) { out.write(data); } catch (Exception e) { throw wrapException(e); } }  @Override void put(byte[] data, File file);  }
@Override @Test public void testPutFileExists() throws Exception { FsWorker worker = createWorker(); String[] testFiles = createTestFiles(); worker.put(DATA.getBytes(), new File(baseDir, testFiles[0])); byte[] readBytes = worker.get(new File(baseDir, testFiles[0])); assertEquals(DATA + DATA, new String(readBytes)); }