return new XsrfRpcProxyCreator(type);
}
/** Create a mocked asynchronous method for testing. */
private static JMethod createMockedAsyncMethod() {
JType stringErasedType = mock(JType.class);
when(stringErasedType.getQualifiedSourceName()).thenReturn("java.lang.String");
JParameter name = mock(JParameter.class, Mockito.RETURNS_DEEP_STUBS);
when(name.getType().getErasedType()).thenReturn(stringErasedType);
when(name.getType().getErasedType().getQualifiedSourceName()).thenReturn("java.lang.String");
when(name.getName()).thenReturn("name");
JType callbackErasedType = mock(JType.class);
when(callbackErasedType.getQualifiedSourceName()).thenReturn("com.google.gwt.user.client.rpc.AsyncCallback");
JParameter callback = mock(JParameter.class, Mockito.RETURNS_DEEP_STUBS);
when(callback.getType().getErasedType()).thenReturn(callbackErasedType);
when(callback.getType().getErasedType().getQualifiedSourceName()).thenReturn("com.google.gwt.user.client.rpc.AsyncCallback");
when(callback.getName()).thenReturn("callback");