Impulse extends PTransform<PBegin, PCollection<byte[]>> { private Impulse() {} private  Impulse(); static Impulse create(); @Override PCollection<byte[]> expand(PBegin input);  }
@Test @Category({ValidatesRunner.class, UsesImpulse.class}) public void testImpulse() { PCollection<Integer> result = p.apply(Impulse.create()) .apply( FlatMapElements.into(TypeDescriptors.integers()) .via(impulse -> Arrays.asList(1, 2, 3))); PAssert.that(result).containsInAnyOrder(1, 2, 3); p.run().waitUntilFinish(); }