// initialize FakeRemoteImpl
impl.setFakeMethodException(
new FakeArgument(new IOException(),null));
// initialize FakeInboundRequest
request = new FakeInboundRequest(methodHash,nullArgs,0x00,0x00);
// call dispatch and verify the proper result
dispatcher.dispatch(impl,request,context);
response = request.getResponseStream();
assertion(response.read() == 0x02);
MarshalInputStream mis = new MarshalInputStream(
response,null,false,null,new ArrayList());
assertion(mis.read() == -1);
// iterate over test cases
for (int i = 0; i < cases.length; i++) {
logger.log(Level.FINE,"=================================");
Throwable marshalThrowException = cases[i];
logger.log(Level.FINE,"test case " + (counter++)
+ ": " + marshalThrowException);
logger.log(Level.FINE,"");
// initialize FakeBasicInvocationDispatcher
dispatcher.setMarshalThrowException(marshalThrowException);
// initialize FakeRemoteImpl
impl.setFakeMethodException(new RemoteException());
// initialize FakeInboundRequest
request = new FakeInboundRequest(methodHash,nullArgs,0x00,0x00);
// call dispatch and verify the proper result
dispatcher.dispatch(impl,request,context);
response = request.getResponseStream();
assertion(response.read() == 0x02);