import org.springframework.util.MultiValueMap;
import java.time.Duration;
-import java.util.stream.Stream;
import static de.juplo.kafka.wordcount.splitter.SplitterApplicationIT.TOPIC_IN;
import static de.juplo.kafka.wordcount.splitter.SplitterApplicationIT.TOPIC_OUT;
public static void testSendMessage(
@Autowired KafkaTemplate<String, TestRecording> kafkaTemplate)
{
- Stream
- .of(TestData.INPUT_MESSAGES)
+ TestData
+ .getInputMessages()
.forEach(kv ->
{
try
static final String KLAUS = "klaus";
- static final KeyValue<String, TestRecording>[] INPUT_MESSAGES = new KeyValue[]
+ static final Stream<KeyValue<String, TestRecording>> getInputMessages()
+ {
+ return Stream.of(INPUT_MESSAGES);
+ }
+
+ private static final KeyValue<String, TestRecording>[] INPUT_MESSAGES = new KeyValue[]
{
new KeyValue<>(
PETER,
assertThat(receivedMessages.get(user)).containsExactlyElementsOf(word)));
}
- static final KeyValue<String, TestWord>[] EXPECTED_MESSAGES = new KeyValue[]
+ private static final KeyValue<String, TestWord>[] EXPECTED_MESSAGES = new KeyValue[]
{
KeyValue.pair(
"peter",