@Override
  public byte[] serialize(final String topic, final T data) {
    if (data == null) {
      return inner.serialize(topic, null);
    }

    final List<?> list = accessor.apply(data);

    SerdeUtils.throwOnColumnCountMismatch(numColumns, list.size(), true, topic);

    return inner.serialize(topic, list);
  }
@Test
  public void shouldConvertRowToListWhenSerializing() {
    // Given:
    final TestListWrapper list = list("hello", 10);

    // When:
    serializer.serialize("topicName", list);

    // Then:
    verify(innerSerializer).serialize("topicName", list.getList());
  }