use of com.hazelcast.jet.pipeline.test.TestSources in project hazelcast by hazelcast.
the class ManagedContextTest method testSources.
private void testSources(SupplierEx<? extends AnotherSourceContext> sourceSupplier) {
BatchSource<String> src = SourceBuilder.batch("source", c -> sourceSupplier.get()).<String>fillBufferFn((c, b) -> {
b.add(c.injectedValue);
b.close();
}).build();
Pipeline pipeline = Pipeline.create();
pipeline.readFrom(src).writeTo(assertAnyOrder(singletonList(INJECTED_VALUE)));
hz.getJet().newJob(pipeline).join();
}
Aggregations