void validateSourceEventTimeStampField(Schema schema) {
    String eventTimestampKeyName = getSourceEventTimestampKeyName();
    if (!schema.hasField(eventTimestampKeyName)) {
      return;
    }
    checkArgument(
        SchemaReflection.of(schema)
            .matchesAll(FieldMatcher.of(eventTimestampKeyName, EVENT_TIMESTAMP_FIELD_TYPE)));
  }
@Test
  public void testValidateSourceEventTimeStampField() {
    PubsubRowToMessage pubsubRowToMessage = PubsubRowToMessage.builder().build();
    pubsubRowToMessage.validateSourceEventTimeStampField(ALL_DATA_TYPES_SCHEMA);
    pubsubRowToMessage.validateSourceEventTimeStampField(
        Schema.of(Field.of(DEFAULT_EVENT_TIMESTAMP_KEY_NAME, EVENT_TIMESTAMP_FIELD_TYPE)));
    assertThrows(
        IllegalArgumentException.class,
        () ->
            pubsubRowToMessage.validateSourceEventTimeStampField(
                Schema.of(Field.of(DEFAULT_EVENT_TIMESTAMP_KEY_NAME, FieldType.STRING))));
  }