Expilcit timeout should be set for waitForMessage and waitForMessageWithId functions, otherwise it will wait indefinitely.
Propesd value is 1 second.
When the timeout is set and waiting fails due to timeout it will be good to show what actually failed and what message was awaited for.