Run { public Bundle getDataBundle() { if (getWorkflowReport() != null) try { workflowReportJson.save(getWorkflowReport(), dataBundle); } catch (IOException e) { logger.log(WARNING, "Can't save workflow report to data bundle", e); } try { Manifest manifest = new Manifest(dataBundle); manifest.populateFromBundle(); manifest.writeAsJsonLD(); } catch (IOException e) { logger.log(WARNING, "Can't add manifest to data bundle", e); } return dataBundle; } Run(RunProfile runProfile);  Run(String id, Bundle bundle); String getID(); State getState(); Bundle getDataBundle(); WorkflowReport getWorkflowReport(); Workflow getWorkflow(); Profile getProfile(); void delete(); void start(); void pause(); void resume(); void cancel();  }
@Test public void getBundle() throws Exception { Bundle bundle = run.getDataBundle(); assertEquals(wfBundle.getGlobalBaseURI(), DataBundles.getWorkflowBundle(bundle).getGlobalBaseURI()); Path runReport = DataBundles.getWorkflowRunReport(bundle); assertTrue(Files.exists(runReport)); JsonNode runReportJson = DataBundles.getWorkflowRunReportAsJson(bundle); assertEquals("COMPLETED", runReportJson.get("state").asText()); }