Mocking GWT Asynchronous Services

You can use jMock to unit test objects that use asynchronous GWT services by
using a custom action to capture the asynchronous callback passed to the service
request. Once it has captured the callback, the action can invoke it to indicate success or
failure of the asynchronous call.