@Test @Category(NeedsRunner.class) public void testSelectMissingFieldName() { thrown.expect(IllegalArgumentException.class); pipeline.apply(Create.of(new POJO1())).apply(Select.fieldNames("missing")); pipeline.run(); }
@Test @Category(NeedsRunner.class) public void testSimpleSelect() { PCollection<POJO1Selected> pojos = pipeline .apply(Create.of(new POJO1())) .apply(Select.fieldNames("field1", "field3")) .apply(Convert.to(POJO1Selected.class)); PAssert.that(pojos).containsInAnyOrder(new POJO1Selected()); pipeline.run(); }