diff --git a/spring-integration-kafka/src/checkstyle/checkstyle-header.txt b/spring-integration-kafka/src/checkstyle/checkstyle-header.txt
new file mode 100644
index 0000000000..f470e973fe
--- /dev/null
+++ b/spring-integration-kafka/src/checkstyle/checkstyle-header.txt
@@ -0,0 +1,17 @@
+^\Q/*\E$
+^\Q * Copyright \E20\d\d(\-20\d\d)?\Q the original author or authors.\E$
+^\Q *\E$
+^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$
+^\Q * you may not use this file except in compliance with the License.\E$
+^\Q * You may obtain a copy of the License at\E$
+^\Q *\E$
+^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$
+^\Q *\E$
+^\Q * Unless required by applicable law or agreed to in writing, software\E$
+^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$
+^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$
+^\Q * See the License for the specific language governing permissions and\E$
+^\Q * limitations under the License.\E$
+^\Q */\E$
+^$
+^.*$
diff --git a/spring-integration-kafka/src/checkstyle/checkstyle-suppressions.xml b/spring-integration-kafka/src/checkstyle/checkstyle-suppressions.xml
new file mode 100644
index 0000000000..4097d904b0
--- /dev/null
+++ b/spring-integration-kafka/src/checkstyle/checkstyle-suppressions.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/spring-integration-kafka/src/checkstyle/checkstyle.xml b/spring-integration-kafka/src/checkstyle/checkstyle.xml
new file mode 100644
index 0000000000..0b6ccaa997
--- /dev/null
+++ b/spring-integration-kafka/src/checkstyle/checkstyle.xml
@@ -0,0 +1,181 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParser.java b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParser.java
index bb0029ada0..816f0b3c90 100644
--- a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParser.java
+++ b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParser.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2015-2016 the original author or authors
+ * Copyright 2015-2016 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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,6 +27,9 @@ import org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAd
import org.springframework.util.StringUtils;
/**
+ *
+ * Parser for the message driven channel adapter.
+ *
* @author Artem Bilan
* @author Gary Russell
*/
diff --git a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaNamespaceHandler.java b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaNamespaceHandler.java
index e44cc21158..c5490651e6 100644
--- a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaNamespaceHandler.java
+++ b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaNamespaceHandler.java
@@ -19,7 +19,7 @@ package org.springframework.integration.kafka.config.xml;
import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler;
/**
- * The namespace handler for the Kafka namespace
+ * The namespace handler for the Kafka namespace.
*
* @author Soby Chacko
* @author Gary Russell
diff --git a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaOutboundChannelAdapterParser.java b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaOutboundChannelAdapterParser.java
index 1781101b86..657b3c3b16 100644
--- a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaOutboundChannelAdapterParser.java
+++ b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/config/xml/KafkaOutboundChannelAdapterParser.java
@@ -27,6 +27,7 @@ import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
import org.springframework.integration.kafka.outbound.KafkaProducerMessageHandler;
/**
+ * Parser for the outbound channel adapter.
*
* @author Soby Chacko
* @author Artem Bilan
diff --git a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/inbound/KafkaMessageDrivenChannelAdapter.java b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/inbound/KafkaMessageDrivenChannelAdapter.java
index 2925d3a312..fee9f08559 100644
--- a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/inbound/KafkaMessageDrivenChannelAdapter.java
+++ b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/inbound/KafkaMessageDrivenChannelAdapter.java
@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,10 +37,16 @@ import org.springframework.messaging.support.MessageBuilder;
import org.springframework.util.Assert;
/**
+ * Message-driven channel adapter.
+ *
+ * @param the key type.
+ * @param the value type.
+ *
* @author Marius Bogoevici
* @author Gary Russell
*
* TODO: Use the MessagingMessageConverter from spring-kafka
+ *
*/
public class KafkaMessageDrivenChannelAdapter extends MessageProducerSupport implements OrderlyShutdownCapable {
@@ -137,27 +143,10 @@ public class KafkaMessageDrivenChannelAdapter extends MessageProducerSuppo
return getPhase();
}
- private class AutoAcknowledgingChannelForwardingMessageListener implements MessageListener {
-
- @Override
- public void onMessage(ConsumerRecord record) {
- sendMessage(toMessage(record, null));
- }
-
- }
-
- private class AcknowledgingChannelForwardingMessageListener implements AcknowledgingMessageListener {
-
- @Override
- public void onMessage(ConsumerRecord record, Acknowledgment acknowledgment) {
- sendMessage(toMessage(record, acknowledgment));
- }
-
- }
-
private Message toMessage(ConsumerRecord record, Acknowledgment acknowledgment) {
- KafkaMessageHeaders kafkaMessageHeaders = new KafkaMessageHeaders(generateMessageId, generateTimestamp);
+ KafkaMessageHeaders kafkaMessageHeaders = new KafkaMessageHeaders(this.generateMessageId,
+ this.generateTimestamp);
Map rawHeaders = kafkaMessageHeaders.getRawHeaders();
rawHeaders.put(KafkaHeaders.MESSAGE_KEY, record.key());
@@ -180,10 +169,28 @@ public class KafkaMessageDrivenChannelAdapter extends MessageProducerSuppo
}
}
- @SuppressWarnings("serial")
- private static class KafkaMessageHeaders extends MessageHeaders {
+ private class AutoAcknowledgingChannelForwardingMessageListener implements MessageListener {
- public KafkaMessageHeaders(boolean generateId, boolean generateTimestamp) {
+ @Override
+ public void onMessage(ConsumerRecord record) {
+ sendMessage(toMessage(record, null));
+ }
+
+ }
+
+ private class AcknowledgingChannelForwardingMessageListener implements AcknowledgingMessageListener {
+
+ @Override
+ public void onMessage(ConsumerRecord record, Acknowledgment acknowledgment) {
+ sendMessage(toMessage(record, acknowledgment));
+ }
+
+ }
+
+ @SuppressWarnings("serial")
+ private static final class KafkaMessageHeaders extends MessageHeaders {
+
+ private KafkaMessageHeaders(boolean generateId, boolean generateTimestamp) {
super(null, generateId ? null : ID_VALUE_NONE, generateTimestamp ? null : -1L);
}
diff --git a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandler.java b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandler.java
index ee5fa64e6d..f8120e6090 100644
--- a/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandler.java
+++ b/spring-integration-kafka/src/main/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandler.java
@@ -26,6 +26,11 @@ import org.springframework.messaging.Message;
import org.springframework.util.Assert;
/**
+ * Kafka Message Handler.
+ *
+ * @param the key type.
+ * @param the value type.
+ *
* @author Soby Chacko
* @author Artem Bilan
* @author Gary Russell
@@ -73,6 +78,7 @@ public class KafkaProducerMessageHandler extends AbstractMessageHandler {
}
/**
+ * Set the partition expression.
* @param partitionExpression an expression that returns a partition id
* @deprecated as of 1.3, {@link #setPartitionIdExpression(Expression)} should be used instead
*/
@@ -111,12 +117,21 @@ public class KafkaProducerMessageHandler extends AbstractMessageHandler {
? this.messageKeyExpression.getValue(this.evaluationContext, message)
: message.getHeaders().get(KafkaHeaders.MESSAGE_KEY);
- // TODO: Add KafkaTemplate method with topic, partition, data only (no key)
if (partitionId == null) {
- this.kafkaTemplate.convertAndSend(topic, (K) messageKey, ((V) message.getPayload()));
+ if (messageKey == null) {
+ this.kafkaTemplate.send(topic, (V) message.getPayload());
+ }
+ else {
+ this.kafkaTemplate.send(topic, (K) messageKey, (V) message.getPayload());
+ }
}
else {
- this.kafkaTemplate.convertAndSend(topic, partitionId, (K) messageKey, ((V) message.getPayload()));
+ if (messageKey == null) {
+ this.kafkaTemplate.send(topic, partitionId, (V) message.getPayload());
+ }
+ else {
+ this.kafkaTemplate.send(topic, partitionId, (K) messageKey, (V) message.getPayload());
+ }
}
}
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParserTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParserTests.java
index 958f54d9e4..4f48b6abae 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParserTests.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaMessageDrivenChannelAdapterParserTests.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2015-2016 the original author or authors
+ * Copyright 2015-2016 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.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,10 +16,7 @@
package org.springframework.integration.kafka.config.xml;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -52,15 +49,15 @@ public class KafkaMessageDrivenChannelAdapterParserTests {
@Test
public void testKafkaMessageDrivenChannelAdapterParser() throws Exception {
- assertFalse(this.kafkaListener.isAutoStartup());
- assertFalse(this.kafkaListener.isRunning());
- assertEquals(100, this.kafkaListener.getPhase());
- assertSame(this.nullChannel, TestUtils.getPropertyValue(this.kafkaListener, "outputChannel"));
- assertSame(this.errorChannel, TestUtils.getPropertyValue(this.kafkaListener, "errorChannel"));
+ assertThat(this.kafkaListener.isAutoStartup()).isFalse();
+ assertThat(this.kafkaListener.isRunning()).isFalse();
+ assertThat(this.kafkaListener.getPhase()).isEqualTo(100);
+ assertThat(TestUtils.getPropertyValue(this.kafkaListener, "outputChannel")).isSameAs(this.nullChannel);
+ assertThat(TestUtils.getPropertyValue(this.kafkaListener, "errorChannel")).isSameAs(this.errorChannel);
KafkaMessageListenerContainer, ?> container =
TestUtils.getPropertyValue(this.kafkaListener, "messageListenerContainer",
KafkaMessageListenerContainer.class);
- assertNotNull(container);
+ assertThat(container).isNotNull();
}
}
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java
index 48b548fa3d..e0acb89455 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java
@@ -16,8 +16,7 @@
package org.springframework.integration.kafka.config.xml;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -48,12 +47,12 @@ public class KafkaOutboundAdapterParserTests {
public void testOutboundAdapterConfiguration() {
KafkaProducerMessageHandler, ?> messageHandler
= this.appContext.getBean("kafkaOutboundChannelAdapter.handler", KafkaProducerMessageHandler.class);
- assertNotNull(messageHandler);
- assertEquals(messageHandler.getOrder(), 3);
- assertEquals("foo", TestUtils.getPropertyValue(messageHandler, "topicExpression.literalValue"));
- assertEquals("'bar'", TestUtils.getPropertyValue(messageHandler, "messageKeyExpression.expression"));
- assertEquals("2", TestUtils.getPropertyValue(messageHandler, "partitionIdExpression.expression"));
- assertEquals(true, TestUtils.getPropertyValue(messageHandler, "enableHeaderRouting"));
+ assertThat(messageHandler).isNotNull();
+ assertThat(messageHandler.getOrder()).isEqualTo(3);
+ assertThat(TestUtils.getPropertyValue(messageHandler, "topicExpression.literalValue")).isEqualTo("foo");
+ assertThat(TestUtils.getPropertyValue(messageHandler, "messageKeyExpression.expression")).isEqualTo("'bar'");
+ assertThat(TestUtils.getPropertyValue(messageHandler, "partitionIdExpression.expression")).isEqualTo("2");
+ assertThat(TestUtils.getPropertyValue(messageHandler, "enableHeaderRouting")).isEqualTo(Boolean.TRUE);
}
}
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java
index 59144271dc..04d3ba458e 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/MessageDrivenAdapterTests.java
@@ -16,7 +16,7 @@
package org.springframework.integration.kafka.inbound;
-import static org.junit.Assert.assertNotNull;
+import static org.assertj.core.api.Assertions.assertThat;
import java.util.Map;
@@ -66,9 +66,9 @@ public class MessageDrivenAdapterTests {
ProducerFactory pf = new DefaultKafkaProducerFactory(senderProps);
KafkaTemplate template = new KafkaTemplate<>(pf);
template.setDefaultTopic("testTopic1");
- template.convertAndSend("foo");
+ template.send("foo");
Message> received = out.receive(10000);
- assertNotNull(received);
+ assertThat(received).isNotNull();
adapter.stop();
}
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandlerTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandlerTests.java
new file mode 100644
index 0000000000..d0898fbca4
--- /dev/null
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/outbound/KafkaProducerMessageHandlerTests.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2016 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.integration.kafka.outbound;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.springframework.kafka.test.assertj.KafkaConditions.key;
+import static org.springframework.kafka.test.assertj.KafkaConditions.partition;
+import static org.springframework.kafka.test.assertj.KafkaConditions.value;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.kafka.clients.consumer.Consumer;
+import org.apache.kafka.clients.consumer.ConsumerRebalanceListener;
+import org.apache.kafka.clients.consumer.ConsumerRecord;
+import org.apache.kafka.clients.consumer.ConsumerRecords;
+import org.apache.kafka.common.TopicPartition;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.integration.support.MessageBuilder;
+import org.springframework.kafka.core.ConsumerFactory;
+import org.springframework.kafka.core.DefaultKafkaConsumerFactory;
+import org.springframework.kafka.core.DefaultKafkaProducerFactory;
+import org.springframework.kafka.core.KafkaTemplate;
+import org.springframework.kafka.core.ProducerFactory;
+import org.springframework.kafka.support.KafkaHeaders;
+import org.springframework.kafka.test.rule.KafkaEmbedded;
+import org.springframework.kafka.test.utils.KafkaTestUtils;
+import org.springframework.messaging.Message;
+
+/**
+ * @author Gary Russell
+ * @since 2.0
+ *
+ */
+public class KafkaProducerMessageHandlerTests {
+
+ private static String topic1 = "testTopic1out";
+
+ private static String topic2 = "testTopic2out";
+
+ @ClassRule
+ public static KafkaEmbedded embeddedKafka = new KafkaEmbedded(1, true, topic1, topic2);
+
+ private static Consumer consumer;
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+ ConsumerFactory cf = new DefaultKafkaConsumerFactory<>(
+ KafkaTestUtils.consumerProps("testOut", "true", embeddedKafka));
+ consumer = cf.createConsumer();
+ final CountDownLatch consumerLatch = new CountDownLatch(1);
+ consumer.subscribe(Arrays.asList(topic1, topic2), new ConsumerRebalanceListener() {
+
+ @Override
+ public void onPartitionsRevoked(Collection partitions) {
+ }
+
+ @Override
+ public void onPartitionsAssigned(Collection partitions) {
+ consumerLatch.countDown();
+ }
+
+ });
+ consumer.poll(0); // force assignment
+ assertThat(consumerLatch.await(30, TimeUnit.SECONDS)).isTrue();
+ }
+
+ @Test
+ public void testOutbound() {
+ ProducerFactory producerFactory = new DefaultKafkaProducerFactory<>(
+ KafkaTestUtils.producerProps(embeddedKafka));
+ KafkaTemplate template = new KafkaTemplate<>(producerFactory);
+ KafkaProducerMessageHandler handler = new KafkaProducerMessageHandler<>(template);
+ handler.setBeanFactory(mock(BeanFactory.class));
+ handler.afterPropertiesSet();
+
+ Message> message = MessageBuilder.withPayload("foo")
+ .setHeader(KafkaHeaders.TOPIC, topic1)
+ .setHeader(KafkaHeaders.MESSAGE_KEY, 2)
+ .setHeader(KafkaHeaders.PARTITION_ID, 1)
+ .build();
+ handler.handleMessage(message);
+
+ ConsumerRecord record = getSingleRecord();
+ assertThat(record).has(key(2));
+ assertThat(record).has(partition(1));
+ assertThat(record).has(value("foo"));
+
+ message = MessageBuilder.withPayload("bar")
+ .setHeader(KafkaHeaders.TOPIC, topic1)
+ .setHeader(KafkaHeaders.PARTITION_ID, 0)
+ .build();
+ handler.handleMessage(message);
+ record = getSingleRecord();
+ assertThat(record).has(key((Integer) null));
+ assertThat(record).has(partition(0));
+ assertThat(record).has(value("bar"));
+
+ message = MessageBuilder.withPayload("baz")
+ .setHeader(KafkaHeaders.TOPIC, topic1)
+ .build();
+ handler.handleMessage(message);
+ record = getSingleRecord();
+ assertThat(record).has(key((Integer) null));
+ assertThat(record).has(value("baz"));
+ }
+
+ private ConsumerRecord getSingleRecord() {
+ ConsumerRecords received = getRecords();
+ assertThat(received.count()).isEqualTo(1);
+ return received.records(topic1).iterator().next();
+ }
+
+ private ConsumerRecords getRecords() {
+ ConsumerRecords received = consumer.poll(10000);
+ assertThat(received).isNotNull();
+ return received;
+ }
+
+}
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestKey.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestKey.java
index fab58fdb87..f37a744b02 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestKey.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestKey.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.integration.kafka.test.utils;
/**
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestPayload.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestPayload.java
index f18a10fee1..1061de369a 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestPayload.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/NonSerializableTestPayload.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.integration.kafka.test.utils;
/**
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestKey.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestKey.java
index ee4314ef49..cbeffa5d14 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestKey.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestKey.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.integration.kafka.test.utils;
import java.io.Serializable;
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestObject.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestObject.java
index 4cb5302b19..301038e3bf 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestObject.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestObject.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.integration.kafka.test.utils;
/**
diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestPayload.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestPayload.java
index 73e9bf4e49..e99561453c 100644
--- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestPayload.java
+++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/test/utils/TestPayload.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2013 the original author or authors.
+ * Copyright 2002-2016 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.
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.integration.kafka.test.utils;
import java.io.Serializable;
@@ -27,7 +28,7 @@ public class TestPayload implements Serializable {
private final String part1;
private final String part2;
- public TestPayload(final String part1, final String part2){
+ public TestPayload(final String part1, final String part2) {
this.part1 = part1;
this.part2 = part2;
}