title: Testing an asynchronous rpc
body: <p><br> has someone here experiences with GWT SyncProxy? <br> I try to test an asynchronous rpc, but the code under onFailure and onSuccess is not tested. Unfortunately there is no error log, but maybe someone can help me. The example is from this page: <a href="http://code.google.com/p/gwt-syncproxy/" rel="nofollow">http://code.google.com/p/gwt-syncproxy/</a></p>
  
  <p>Edit: <br>
  I want that the test fails. So i added 'assertNull(result);'. The strange thing is that the console gives as result first 'async good' and after that 'async bad'. So the function is running twice?! And Junit gives as result green.      </p>
  
  <pre><code>public class Greeet extends TestCase {
  @Test
  public void testGreetingServiceAsync() throws Exception {
        GreetingServiceAsync rpcServiceAsync = (GreetingServiceAsync) SyncProxy.newProxyInstance(
          GreetingServiceAsync.class, 
          "http://127.0.0.1:8888/greettest/", "greet");
  
        rpcServiceAsync.greetServer("SyncProxy", new AsyncCallback&lt;String&gt;() {
          public void onFailure(Throwable caught) {
            System.out.println("Async bad " );
          }
          public void onSuccess(String result) {
            System.out.println("Async good " );
            assertNull(result);
          }
        });
  
        Thread.sleep(100); // configure a sleep time similar to the time spend by the request
  }
  }
  </code></pre>