@Override
  public byte[] serialize(final String topic, final T data) {
    try {
      return delegate.serialize(topic, data);
    } catch (final RuntimeException e) {
      processingLogger.error(new SerializationError<>(e, Optional.of(data), topic, isKey));
      throw e;
    }
  }
@Test
  public void shouldSerializeWithDelegate() {
    // Given:
    when(delegate.serialize(any(), any())).thenReturn(SOME_BYTES);

    // When:
    serializer.serialize("some topic", SOME_ROW);

    // Then:
    verify(delegate).serialize("some topic", SOME_ROW);
  }