Cashier { public static VendorFactory getVendorFactory(String vendorId) { if (TextUtils.isEmpty(vendorId)) { throw new IllegalArgumentException("Invalid vendor id, null or empty"); } final VendorFactory factory = vendorFactories.get(vendorId); if (factory == null) { throw new VendorMissingException(vendorId); } return factory; } private  Cashier(Context context, Vendor vendor); static void putVendorFactory(String vendorId, VendorFactory factory); static VendorFactory getVendorFactory(String vendorId); static Builder forInstaller(Context context); static Builder forVendor(Context context, Vendor vendor); static Builder forPurchase(Context context, Purchase purchase); static Builder forProduct(Context context, Product product); static Product productFromVendor(String json); static Product productFromVendor(JSONObject json); static Purchase purchaseFromVendor(String json); static Purchase purchaseFromVendor(JSONObject json); void purchase(Activity activity, Product product, PurchaseListener listener); void purchase(final Activity activity,
                       final Product product,
                       @Nullable final String developerPayload,
                       final PurchaseListener purchaseListener); void consume(final Purchase purchase, final ConsumeListener listener); void getInventory(final InventoryListener listener); void getInventory(@Nullable final Collection<String> itemSkus,
                           @Nullable final Collection<String> subSkus,
                           final InventoryListener listener); void getProductDetails(final String sku, final boolean isSubscription, final ProductDetailsListener listener); String vendorId(); void dispose(); boolean onActivityResult(int requestCode, int resultCode, Intent data);  }
@Test public void getsVendorFactory() { assertThat(Cashier.getVendorFactory(TEST_VENDOR_ID)).isEqualTo(testVendorFactory); }