<T> Serde<T> wrapInLoggingSerde(
          final Serde<T> formatSerde,
          final String loggerNamePrefix,
          final ProcessingLogContext processingLogContext
  ) {
    return wrapInLoggingSerde(
        formatSerde,
        loggerNamePrefix,
        processingLogContext,
        Optional.empty()
    );
  }
@Test
  public void shouldWrapDeserializerWithLoggingSerializer() {
    // Given:
    when(processingLoggerFactory.getLogger("prefix.deserializer")).thenReturn(processingLoggerWithoutQueryId);

    // When:
    final Serde<String> result = serdeFactory
        .wrapInLoggingSerde(formatSerde, "prefix", processingLogContext);

    // Then:
    assertThrows(
        RuntimeException.class,
        () -> result.deserializer().deserialize(
            "topicName",
            "this call will cause error to be logged".getBytes(StandardCharsets.UTF_8)
        )
    );

    verify(processingLoggerWithoutQueryId).error(any());
  }