@Override public void onSuccess(@Nonnull Object result) { requests.getWholePurchaseHistory(ProductTypes.IN_APP, null, HistoryLoader.this); } });
@Test public void testShouldLoadWholePurchaseHistory() throws Exception { final Billing billing = prepareMultiPurchasesBilling(); final CountDownLatch latch = new CountDownLatch(1); final CountDownListener l = new CountDownListener(latch); billing.getRequests().getWholePurchaseHistory(ProductTypes.IN_APP, null, l); assertTrue(latch.await(1, SECONDS)); verify(l.listener).onSuccess(argThat(new PurchasesMatcher())); }