public static WindowedRow of(
      final LogicalSchema schema,
      final Windowed<GenericKey> key,
      final GenericRow value,
      final long rowTime
  ) {
    return new WindowedRow(schema, key, value, rowTime, TableRowValidation::validate);
  }
@SuppressWarnings("UnstableApiUsage")
  @Test
  public void shouldImplementEquals() {
    final LogicalSchema differentSchema = LogicalSchema.builder()
        .keyColumn(ColumnName.of("k0"), SqlTypes.STRING)
        .keyColumn(ColumnName.of("k1"), SqlTypes.INTEGER)
        .valueColumn(ColumnName.of("diff0"), SqlTypes.STRING)
        .valueColumn(ColumnName.of("diff1"), SqlTypes.DOUBLE)
        .build();

    new EqualsTester()
        .addEqualityGroup(
            WindowedRow.of(SCHEMA, A_WINDOWED_KEY, A_VALUE, A_ROWTIME),
            WindowedRow.of(SCHEMA, A_WINDOWED_KEY, A_VALUE, A_ROWTIME)
        )
        .addEqualityGroup(
            WindowedRow.of(differentSchema, A_WINDOWED_KEY, A_VALUE, A_ROWTIME)
        )
        .addEqualityGroup(
            WindowedRow.of(SCHEMA, new Windowed<>(GenericKey.genericKey(null, null), A_WINDOW), A_VALUE, A_ROWTIME)
        )
        .addEqualityGroup(
            WindowedRow.of(SCHEMA, new Windowed<>(A_KEY, mock(TimeWindow.class, "diff")), A_VALUE, A_ROWTIME)
        )
        .addEqualityGroup(
            WindowedRow.of(SCHEMA, A_WINDOWED_KEY, GenericRow.genericRow(null, null), A_ROWTIME)
        )
        .addEqualityGroup(
            WindowedRow.of(SCHEMA, A_WINDOWED_KEY, A_VALUE, -1L)
        )
        .testEquals();
  }