Create a matcher to verify the value of Aggregator, which is AggregatorValues, by given expected values.
For example:
MyFnWithAggregator fn = new MyFnWithAggregator();
Pipeline p = ... (setup the pipeline, use fn) ...
p.run();
assertThat(pResult,
isAggregatorValue(values, fn.aggregator));
It also should be integrated in E2E pipeline test and used by setting onSuccessMatcher.
Imported from Jira BEAM-546. Original Jira may contain additional context.
Reported by: markflyhigh.