InAppBillingV3Vendor implements Vendor { @Override public void getProductDetails(Context context, String sku, boolean isSubscription, ProductDetailsListener listener) { if (context == null || sku == null || listener == null) { throw new IllegalArgumentException("Context or sku or listener is null"); } throwIfUninitialized(); final String type = isSubscription ? PRODUCT_TYPE_SUBSCRIPTION : PRODUCT_TYPE_ITEM; try { final List<Product> productList = getProductsWithType(Collections.singletonList(sku), type); if (productList.isEmpty()) { listener.failure(new Vendor.Error(PRODUCT_DETAILS_NOT_FOUND, -1)); return; } listener.success(productList.get(0)); } catch (RemoteException | ApiException e) { listener.failure(new Vendor.Error(PRODUCT_DETAILS_QUERY_FAILURE, codeFromException(e))); } } InAppBillingV3Vendor();  InAppBillingV3Vendor(String publicKey64);  InAppBillingV3Vendor(AbstractInAppBillingV3API api);  InAppBillingV3Vendor(AbstractInAppBillingV3API api, @Nullable String publicKey64); @Override String id(); @Override void initialize(Context context, InitializationListener listener); @Override void dispose(Context context); @Override boolean available(); @Override boolean canPurchase(Product product); @Override void purchase(Activity activity, Product product, String developerPayload,
                       PurchaseListener listener); @Override void consume(Context context, Purchase purchase, ConsumeListener listener); @Override void getInventory(Context context, Collection<String> inappSkus, Collection<String> subSkus,
                           InventoryListener listener); @Override void getProductDetails(Context context, String sku, boolean isSubscription,
                                ProductDetailsListener listener); @Override void setLogger(@Nullable Logger logger); @Override boolean onActivityResult(int requestCode, int resultCode, Intent data); @Override Product getProductFrom(JSONObject json); @Override Purchase getPurchaseFrom(JSONObject json);  }
@Test(expected = IllegalStateException.class) public void getProductDetailsRequiresInitialization() throws RemoteException { InAppBillingV3Vendor vendor = new InAppBillingV3Vendor(api, null); vendor.getProductDetails(mock(Context.class), "", false, mock(ProductDetailsListener.class)); }