public void testCreation() {
   delayTestFinish(TEST_DELAY);
   Context ctx = factory.ctx();
   checkA(ctx, AProxy.class);
   checkB(ctx, B1Proxy.class);
   checkB(ctx, B2Proxy.class);
   checkC(ctx, C1Proxy.class);
   checkC(ctx, C2Proxy.class);
   checkD(ctx, D1Proxy.class);
   checkD(ctx, D2Proxy.class);
   // D3Proxy is a proxy supertype, assignable to BaseProxy and has @ProxyFor
   checkD(ctx, D3Proxy.class);
   checkD(ctx, MoreDerivedProxy.class);
   checkW(ctx, WProxy.class);
   checkW(ctx, WZProxy.class);
   checkZ(ctx, ZProxy.class);
   checkZ(ctx, ZWProxy.class);
   ctx.fire(
       new Receiver<Void>() {
         @Override
         public void onSuccess(Void response) {
           finishTest();
         }
       });
 }
 public void testRetrievalCollection() {
   delayTestFinish(TEST_DELAY);
   Context ctx = factory.ctx();
   ctx.testCollection().to(new ListChecker());
   ctx.testCollectionSub().to(new ListChecker());
   ctx.fire(
       new Receiver<Void>() {
         @Override
         public void onSuccess(Void response) {
           finishTest();
         }
       });
 }
 /** Ensure heterogeneous collections work. */
 public void testCreationList() {
   Context ctx = factory.ctx();
   ctx.checkList(
           Arrays.asList(
               create(ctx, AProxy.class),
               create(ctx, B2Proxy.class),
               create(ctx, C2Proxy.class),
               create(ctx, D2Proxy.class)))
       .to(checkReceiver);
   ctx.fire(
       new Receiver<Void>() {
         @Override
         public void onSuccess(Void response) {
           finishTest();
         }
       });
 }
 public void testRetrieval() {
   delayTestFinish(TEST_DELAY);
   Context ctx = factory.ctx();
   ctx.AasA().to(CastAndCheckReceiver.of(AProxy.class));
   ctx.BasA().to(CastAndCheckReceiver.of(B1Proxy.class));
   ctx.BasB().to(CastAndCheckReceiver.of(B1Proxy.class));
   ctx.CasA().to(CastAndCheckReceiver.of(C1Proxy.class));
   ctx.CasB().to(CastAndCheckReceiver.of(C1Proxy.class));
   ctx.DasA().to(CastAndCheckReceiver.of(MoreDerivedProxy.class));
   ctx.DasD().to(CastAndCheckReceiver.of(MoreDerivedProxy.class));
   ctx.W().to(CastAndCheckReceiver.of(WProxy.class));
   ctx.W2().to(CastAndCheckReceiver.of(WZProxy.class));
   ctx.Z().to(CastAndCheckReceiver.of(ZProxy.class));
   ctx.Z2().to(CastAndCheckReceiver.of(ZWProxy.class));
   ctx.fire(
       new Receiver<Void>() {
         @Override
         public void onSuccess(Void response) {
           finishTest();
         }
       });
 }