PipelineLoader { public void loadPipelineIntoExecution() throws MonitorException { File file = getPipelineFile(); Statements pipeline = loadPipelineFile(file); searchForPipelineAndMetadata(pipeline); execution.setPipeline(pipelineResource); if (pipelineResource == null) { throw new MonitorException( "Missing pipeline resource for: {}", execution.getId()); } Statements output = Statements.arrayList(); output.setDefaultGraph(execution.getListGraph()); output.addAll(processMetadata(pipeline)); output.addAll(processPipeline()); selectUsedLabels(pipeline).forEach(output::integrate); execution.setPipelineStatements(output); } PipelineLoader(Execution execution); void loadPipelineIntoExecution();  }
@Test public void loadPipeline() throws MonitorException { Execution execution = new Execution(); execution.setIri("http: execution.setDirectory(TestUtils.resource("execution")); PipelineLoader loader = new PipelineLoader(execution); loader.loadPipelineIntoExecution(); Statements expected = Statements.arrayList(); expected.setDefaultGraph(execution.getListGraph()); expected.addIri("http: expected.addString("http: String meta = "http: expected.addIri(meta, RDF.TYPE, LP_PIPELINE.EXECUTION_METADATA); expected.addIri(meta, LP_EXEC.HAS_TARGET_COMPONENT, "http: expected.addString("http: Statements actual = new Statements(execution.getPipelineStatements()); Assert.assertTrue(actual.containsAllLogMissing(expected)); }