I trying to test the following ParDo handler:
public class DoFnHandlerFn extends DoFn<KV<Row, Row>, Row> {
@ProcessElement
public void processElement(@NotNull ProcessContext ctx, @SideInput("si_1") Map<Row, Iterable<Row>> si_1, @SideInput("si_2") List<Row> si_2) {
var el = ctx.element();
}
}
But I have difficulty creating ProcessContext instance! I tried
var el = new DoFn.ProcessContext();
But I don't allowed to do it with error message: 'org.apache.beam.sdk.transforms.DoFn' is not an enclosing class
How can I instantiate ProcessContext object in order to test it?