CAMEL-9957 Fixed the build error of KafkaProducerTest
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/32b9bf2b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/32b9bf2b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/32b9bf2b Branch: refs/heads/master Commit: 32b9bf2b8d2b7802fee98db0d11bbb4d2478873e Parents: 123f08f Author: Willem Jiang <willem.ji...@gmail.com> Authored: Wed May 11 14:08:08 2016 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Wed May 11 14:09:43 2016 +0800 ---------------------------------------------------------------------- .../java/org/apache/camel/component/kafka/KafkaProducerTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/32b9bf2b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java ---------------------------------------------------------------------- diff --git a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java index 62ab51f..7c52629 100644 --- a/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java +++ b/components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaProducerTest.java @@ -85,7 +85,7 @@ public class KafkaProducerTest { endpoint.setTopic("sometopic"); // setup the exception here org.apache.kafka.clients.producer.KafkaProducer kp = producer.getKafkaProducer(); - Mockito.when(kp.send(Mockito.any())).thenThrow(new ApiException()); + Mockito.when(kp.send(Mockito.any(ProducerRecord.class))).thenThrow(new ApiException()); Mockito.when(exchange.getIn()).thenReturn(in); in.setHeader(KafkaConstants.PARTITION_KEY, "4"); @@ -115,7 +115,7 @@ public class KafkaProducerTest { // setup the exception here org.apache.kafka.clients.producer.KafkaProducer kp = producer.getKafkaProducer(); - Mockito.when(kp.send(Mockito.any(), Mockito.any())).thenThrow(new ApiException()); + Mockito.when(kp.send(Mockito.any(ProducerRecord.class), Mockito.any(Callback.class))).thenThrow(new ApiException()); in.setHeader(KafkaConstants.PARTITION_KEY, "4");