The endpoint must be ready to receive messages immediately after it has been set up. In particular implementations must not make the assumption that messages are only during a call to {@link #waitForMessage(int)}. Indeed, a typical test case will set up the endpoint, send a message and only afterwards call {@link #waitForMessage(int)}.
There are two strategies to guarantee this behavior:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|