If you look at the source code of the "Remote API" project you will find unit tests for web scripts regardless of how they are implemented. Search for *Test.java containing the word "GET".
There's also a few examples of testing the java script interfaces. Basically you get a Junit test to run a piece of Java Script that performs the test.