I just used Guice + Gin + Mockito and found this very productive for
writing well tested code. Especially if you apply MVP on the client-
side, you can unit test your client logic rapidly / test-drive with
normal JUnit / TestNG.
I used RPC and just mocked out the AsyncCalls using Mockito,
simulating that certain Callbacks arrive.
Then you can just test your client side, make different scenarios,
suppose Object Blah is returned by AsyncCallback.onSuccess(Object obj)
and so on.
On the server side you can use Guice to decouple the actual
servicesImpl completely from the RPC-mechanism. Then your server
classes only need to implement the synchronous client interface, not
RemoteServiceServlet anymore.
So you can easily test all your server-side logic like normal java
classes, can check that if the client sends this and that RPC request
(meaning this and that request objects), that the service method
really does what it is supposed to, and gives back the correct values.
If you're interested in this, here are some links:
Guice:
http://code.google.com/docreader/#p=google-guice&s=google-guice&t=UsersGuide
Gin:
http://code.google.com/p/google-gin/
Mockito:
http://mockito.org/
How to mock AsyncCalls with Mockito (Example):
http://blog.reflectedcircle.co.uk/?p=162
How to use Guice for decoupling RPC-Services (Example):
http://stuffthathappens.com/blog/2009/09/14/guice-with-gwt/
If you use this, you can make sure, that the correct RPC-objects are
returned on simulated calls without ever sending real requests over
the wire or to specific URLs...