@Test public void executePipeline( final @Mocked MorphlineUtils.Pipeline pipeline, final @Mocked Command morphline ) throws Exception { final Record inputRecord = new Record(); final Record outputRecord = new Record(); outputRecord.put("field1", "value1"); new Expectations() {{ morphline.process(inputRecord); result = true; pipeline.getCollector().getRecords(); result = Lists.newArrayList(outputRecord); }}; List<Record> outputList = MorphlineUtils.executePipeline(pipeline, inputRecord); assertEquals(Lists.newArrayList(outputRecord), outputList); }
public static List<Record> executePipeline(Pipeline pipeline, Record inputRecord) { return executePipeline(pipeline, inputRecord, true); }
MorphlineUtils { public static List<Record> executePipeline(Pipeline pipeline, Record inputRecord) { return executePipeline(pipeline, inputRecord, true); } }
MorphlineUtils { public static List<Record> executePipeline(Pipeline pipeline, Record inputRecord) { return executePipeline(pipeline, inputRecord, true); }  }
MorphlineUtils { public static List<Record> executePipeline(Pipeline pipeline, Record inputRecord) { return executePipeline(pipeline, inputRecord, true); }  static Pipeline getPipeline(String morphlineFile, String morphlineId); static Pipeline setPipeline(String morphlineFile, String morphlineId, Collector collector, boolean isProduction); static List<Record> executePipeline(Pipeline pipeline, Record inputRecord); static List<Record> executePipeline(Pipeline pipeline, Record inputRecord, boolean errorOnEmpty); @SuppressWarnings("serial") static FlatMapFunction<Row, Row> morphlineMapper(final String morphlineFile, final String morphlineId,
                                                          final StructType outputSchema, final boolean errorOnEmpty); static Row convertToRow(StructType schema, Record record); }
MorphlineUtils { public static List<Record> executePipeline(Pipeline pipeline, Record inputRecord) { return executePipeline(pipeline, inputRecord, true); }  static Pipeline getPipeline(String morphlineFile, String morphlineId); static Pipeline setPipeline(String morphlineFile, String morphlineId, Collector collector, boolean isProduction); static List<Record> executePipeline(Pipeline pipeline, Record inputRecord); static List<Record> executePipeline(Pipeline pipeline, Record inputRecord, boolean errorOnEmpty); @SuppressWarnings("serial") static FlatMapFunction<Row, Row> morphlineMapper(final String morphlineFile, final String morphlineId,
                                                          final StructType outputSchema, final boolean errorOnEmpty); static Row convertToRow(StructType schema, Record record);  }