public void postDocuments(int numberToPost) throws JsonException, IOException, HttpException, URISyntaxException {
RemotePipeline rp = new HttpRemotePipeline("insertStage");
for(int i=0; i<numberToPost; i++) {
rp.saveFull(LocalDocumentFactory.getRandomStringDocument("in", "id"));
RemotePipeline rp2 = new HttpRemotePipeline("fileAdder");
LocalDocument ld = rp2.getDocument(new LocalQuery());
File f = getFile();
FileInputStream fis = new FileInputStream(f);
DocumentFile<Local> df = new DocumentFile<Local>(ld.getID(), f.getName(), fis);
df.setEncoding(new InputStreamReader(df.getStream()).getEncoding());
df.setMimetype("application/msword");