Moved test to use a test client callback that queue up all received messages

This commit is contained in:
andsel
2016-03-06 19:50:47 +01:00
parent 6cadaebb0c
commit 4e8f72a34b
8 changed files with 71 additions and 159 deletions
@@ -197,11 +197,13 @@ public class ProtocolProcessorTest {
//Verify
firstReceiverChannel.flush();
PublishMessage pub2FirstSubscriber = (PublishMessage) firstReceiverChannel.readOutbound();
assertNotNull(pub2FirstSubscriber);
String firstMessageContent = DebugUtils.payload2Str(pub2FirstSubscriber.getPayload());
assertEquals("Hello", firstMessageContent);
secondReceiverChannel.flush();
PublishMessage pub2SecondSubscriber = (PublishMessage) secondReceiverChannel.readOutbound();
assertNotNull(pub2SecondSubscriber);
String secondMessageContent = DebugUtils.payload2Str(pub2SecondSubscriber.getPayload());