@Test public void shouldQueryInventoryInvalidSignature() throws Exception {

    shouldStartSetup_CheckForSubscriptions_Unavailable();
    when(signatureValidator.validate(eq("{}"), eq("INVALID"))).thenReturn(false);
    Bundle response = new Bundle();
    response.putStringArrayList(RESPONSE_INAPP_ITEM_LIST, asArrayList("foo"));
    response.putStringArrayList(RESPONSE_INAPP_PURCHASE_DATA_LIST, asArrayList("{}"));
    response.putStringArrayList(RESPONSE_INAPP_SIGNATURE_LIST, asArrayList("INVALID"));
    response.putString(INAPP_CONTINUATION_TOKEN, "");
    when(service.getPurchases(API_VERSION, Robolectric.application.getPackageName(), "inapp", null))
            .thenReturn(response);
    try {
        helper.queryInventory(false, null ,null);
        fail("expected exception");
    } catch (IabException e) {
        assertThat(e.getResult()).isEqualTo(new IabResult(IABHELPER_VERIFICATION_FAILED,
                "Error refreshing inventory (querying owned items)."));
    }
}