@Override
  public PubsubMessage apply(Row row) {
    return new PubsubMessage(payloadExtractor.apply(row), attributesExtractor.apply(row));
  }
@Test
  public void mapAttributesTransformed() {
    Schema schema =
        Schema.builder()
            .addByteArrayField(PAYLOAD_FIELD)
            .addField(ATTRIBUTES_FIELD, ATTRIBUTE_MAP_FIELD_TYPE)
            .build();
    Row row = Row.withSchema(schema).attachValues("abc".getBytes(UTF_8), ATTRIBUTES);
    PubsubMessage message = new PubsubMessage("abc".getBytes(UTF_8), ATTRIBUTES);
    assertEquals(message, new NestedRowToMessage(SERIALIZER, schema).apply(row));
  }