}
});
server.setHandler(handler);
server.start();
GwtRpcService service = injector.getInstance(GwtRpcService.class);
//Create our proxy-based service using GwtRpcService
TestService testService = service.create(new URL("http://localhost:" + PORT), TestService.class);
//Run Synchronous Tests
testService.easy();
try { testService.multipleArgs(null, null); Assert.fail(); } catch(Exception e) { }
String test = "test";
Assert.assertEquals(test, testService.echoSimple(test));
Set<String> set = new TreeSet<String>();
set.add("test");
Assert.assertEquals(set, testService.echoGeneric(set));
//Run Asynchronous Tests
TestServiceAsync serviceAsync = service.create(new URL("http://localhost:" + PORT), TestServiceAsync.class);
serviceAsync.easy(new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable throwable) {
Assert.assertNotNull(throwable);
}