import org.springframework.util.MultiValueMap;
import java.time.Duration;
-import java.util.function.BiConsumer;
import java.util.stream.Stream;
import static org.assertj.core.api.Assertions.assertThat;
static final String PETER = "peter";
static final String KLAUS = "klaus";
- static void writeInputData(BiConsumer<String, TestRecording> consumer)
+
+ static final Stream<KeyValue<String, TestRecording>> getInputMessages()
{
- Stream
- .of(INPUT_MESSAGES)
- .forEach(kv -> consumer.accept(kv.key, kv.value));
+ return Stream.of(INPUT_MESSAGES);
}
- static final KeyValue<String, TestRecording>[] INPUT_MESSAGES = new KeyValue[]
+ 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",