static Builder builder() {
    return new AutoValue_PubsubRowToMessage.Builder();
  }
@Test
  public void testExpandError() {
    PayloadSerializer mismatchedSerializerProviderSchema =
        new JsonPayloadSerializerProvider()
            .getSerializer(Schema.of(STRING_FIELD), ImmutableMap.of());

    Row withAllDataTypes =
        rowWithAllDataTypes(
            true,
            (byte) 0,
            Instant.now().toDateTime(),
            BigDecimal.valueOf(1L),
            3.12345,
            4.1f,
            (short) 5,
            2,
            7L,
            "asdfjkl;");

    PubsubRowToMessage transformWithSerializer =
        PubsubRowToMessage.builder()
            .setPayloadSerializer(mismatchedSerializerProviderSchema)
            .build();

    PAssert.that(
            pipeline
                .apply(Create.of(withAllDataTypes))
                .setRowSchema(ALL_DATA_TYPES_SCHEMA)
                .apply(transformWithSerializer)
                .get(ERROR)
                .apply(Count.globally()))
        .containsInAnyOrder(1L);

    pipeline.run(PIPELINE_OPTIONS);
  }