launchRemoteTestNG(arg, portValue);
MessageHub mh = new MessageHub(sms);
List<String> received = Lists.newArrayList();
try {
mh.initReceiver();
IMessage message = mh.receiveMessage();
while (message != null) {
received.add(message.getClass().getSimpleName());
message = mh.receiveMessage();
}
Assert.assertEquals(received, EXPECTED_MESSAGES);
}