}
public void testBadSerialization2() {
final boolean[] callbackFired = new boolean[] {false};
Request req = getService().echoRequest(
new MixedSerializable.NonSerializableSub(),
new AsyncCallback<MixedSerializable>() {
@Override
public void onFailure(Throwable caught) {
callbackFired[0] = true;
}
@Override
public void onSuccess(MixedSerializable result) {
fail("RPC request should have failed");
}
});
assertTrue(callbackFired[0]); // should have happened synchronously
assertFalse(req.isPending());
req.cancel();
}