Fix test for SK 2.2.4

Override deserializer getters in test consumer factory because the
defaults incorrectly throw an `UnsupportedOperationException`.

See https://github.com/spring-projects/spring-kafka/pull/963
This commit is contained in:
Gary Russell
2019-02-13 16:28:13 -05:00
parent 31a6f5d7e3
commit 63a4acda1b

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2018 the original author or authors.
* Copyright 2017-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@ import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.common.PartitionInfo;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.serialization.Deserializer;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
@@ -263,6 +264,16 @@ public class KafkaBinderUnitTests {
return props;
}
@Override
public Deserializer<byte[]> getKeyDeserializer() {
return null;
}
@Override
public Deserializer<byte[]> getValueDeserializer() {
return null;
}
};
}