use of org.apache.beam.examples.cookbook.CombinePerKeyExamples.ExtractLargeWordsFn in project beam by apache.
the class CombinePerKeyExamplesTest method testExtractLargeWordsFn.
@Test
public void testExtractLargeWordsFn() throws Exception {
DoFnTester<TableRow, KV<String, String>> extractLargeWordsFn = DoFnTester.of(new ExtractLargeWordsFn());
List<KV<String, String>> results = extractLargeWordsFn.processBundle(ROWS_ARRAY);
Assert.assertThat(results, CoreMatchers.hasItem(tuple1));
Assert.assertThat(results, CoreMatchers.hasItem(tuple2));
Assert.assertThat(results, CoreMatchers.hasItem(tuple3));
}
Aggregations