@Test public void shouldFailPurchaseWhenSendIntentExceptionIsThrown() throws Exception {

    shouldStartSetup_SuccessCase();
    Activity activity = new Activity() {
        @Override
        public void startIntentSenderForResult(IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) throws IntentSender.SendIntentException {
            throw new IntentSender.SendIntentException("Failz");
        }
    };
    Bundle response = new Bundle();
    response.putParcelable(RESPONSE_BUY_INTENT, PendingIntent.getActivity(Robolectric.application, 0, new Intent(), 0));
    when(service.getBuyIntent(API_VERSION, Robolectric.application.getPackageName(), "sku", "inapp", "")).thenReturn(response);
    helper.launchPurchaseFlow(activity, "sku", INAPP, TEST_REQUEST_CODE, purchaseFinishedListener, "");
    verify(purchaseFinishedListener).onIabPurchaseFinished(
            new IabResult(IABHELPER_SEND_INTENT_FAILED),
            null);
}