"returnAny", new ThreadId(new byte[] { 0, 1 }), null);
iReceiver.readMessage();
// send a reply
iReceiver.writeReply(
false, new ThreadId(new byte[] { 0, 1 }), Any.VOID);
Message iMessage = iSender.readMessage();
Object result = iMessage.getResult();
assertTrue(
result instanceof Any &&
((TypeDescription.getTypeDescription(((Any) result).getType()).
getZClass()) ==
void.class));
// send an ordinary request
iSender.writeRequest(
oId, TypeDescription.getTypeDescription(TestXInterface.class),
"returnAny", new ThreadId(new byte[] { 0, 1 }), null);
iReceiver.readMessage();
// send a reply
iReceiver.writeReply(
false, new ThreadId(new byte[] { 0, 1 }),
new Any(XInterface.class, null));
iMessage = iSender.readMessage();
result = iMessage.getResult();
assertNull(result);
// send an ordinary request
iSender.writeRequest(
oId, TypeDescription.getTypeDescription(TestXInterface.class),
"returnAny", new ThreadId(new byte[] { 0, 1 }), null);
iReceiver.readMessage();
// send a reply
iReceiver.writeReply(
false, new ThreadId(new byte[] { 0, 1 }), new Integer(501));
iMessage = iSender.readMessage();
result = iMessage.getResult();
assertEquals(501, result);
}