public static <T extends Serializable> SerializableCoder<T> of(TypeDescriptor<T> type) {
    @SuppressWarnings("unchecked")
    Class<T> clazz = (Class<T>) type.getRawType();
    return new SerializableCoder<>(clazz, type);
  }
@Test
  @Category(NeedsRunner.class)
  public void testDefaultCoder() throws Exception {
    p.enableAbandonedNodeEnforcement(true);

    // Use MyRecord as input and output types without explicitly specifying
    // a coder (this uses the default coders, which may not be
    // SerializableCoder).
    PCollection<String> output =
        p.apply(Create.of("Hello", "World"))
            .apply(ParDo.of(new StringToRecord()))
            .apply(ParDo.of(new RecordToString()));

    PAssert.that(output).containsInAnyOrder("Hello", "World");

    p.run();
  }