use of com.hazelcast.jet.pipeline.test.SimpleEvent in project hazelcast by hazelcast.
the class SpringServiceFactoriesTest method testMapStreamUsingSpringBean.
@Test
public void testMapStreamUsingSpringBean() {
Pipeline pipeline = Pipeline.create();
pipeline.readFrom(TestSources.itemStream(100)).withNativeTimestamps(0).map(SimpleEvent::sequence).mapUsingService(bean("calculator"), Calculator::multiply).writeTo(assertCollectedEventually(10, c -> {
assertTrue(c.size() > 100);
c.forEach(i -> assertTrue(i <= 0));
}));
Job job = jet.newJob(pipeline);
assertJobCompleted(job);
}
Aggregations