use of org.apache.beam.sdk.values.PCollectionList in project beam by apache.
the class PTransformMatchersTest method flattenWithDuplicateInputsWithDuplicates.
@Test
public void flattenWithDuplicateInputsWithDuplicates() {
PCollection<Object> duplicate = PCollection.createPrimitiveOutputInternal(p, WindowingStrategy.globalDefault(), IsBounded.BOUNDED);
AppliedPTransform application = AppliedPTransform.<PCollectionList<Object>, PCollection<Object>, Flatten.PCollections<Object>>of("Flatten", ImmutableMap.<TupleTag<?>, PValue>builder().put(new TupleTag<Object>(), duplicate).put(new TupleTag<Object>(), duplicate).build(), Collections.<TupleTag<?>, PValue>singletonMap(new TupleTag<Object>(), PCollection.createPrimitiveOutputInternal(p, WindowingStrategy.globalDefault(), IsBounded.BOUNDED)), Flatten.pCollections(), p);
assertThat(PTransformMatchers.flattenWithDuplicateInputs().matches(application), is(true));
}
Aggregations