MessageTransfer xfr = new MessageTransfer();
xfr.setBody(new byte[2048]);
delegate.messageTransfer(session, xfr);
assertFalse("No methods invoked - expecting at least 1", invokedMethods.isEmpty());
Method firstInvoked = invokedMethods.get(0);
assertTrue("First invoked method not execution error", firstInvoked instanceof ExecutionException);
assertEquals(ExecutionErrorCode.RESOURCE_LIMIT_EXCEEDED, ((ExecutionException)firstInvoked).getErrorCode());
invokedMethods.clear();