Select { public static <T> Fields<T> create() { return fieldAccess(FieldAccessDescriptor.create()); }  static Fields<T> create(); static Fields<T> fieldIds(Integer... ids); static Fields<T> fieldNames(String... names); static Fields<T> fieldAccess(FieldAccessDescriptor fieldAccessDescriptor); static Flattened<T> flattenedSchema();  }
@Test @Category(NeedsRunner.class) public void testSimpleSelectRename() { PCollection<Schema1SelectedRenamed> rows = pipeline .apply(Create.of(Schema1.create())) .apply( Select.<Schema1>create() .withFieldNameAs("field1", "fieldOne") .withFieldNameAs("field3", "fieldThree")) .apply(Convert.to(Schema1SelectedRenamed.class)); PAssert.that(rows).containsInAnyOrder(Schema1SelectedRenamed.create()); pipeline.run(); }