@Test
public void testAsyncFailure() {

    FunctionTestHarness harness = FunctionTestHarness.test(new TestProviderWithMultipleFailures(), MERCHANT_FN, SELF_ID);
    Assert.assertThat(
            harness.invoke(CALLER, QueryMerchantScore.getDefaultInstance()),
            sent(messagesTo(CALLER, equalTo(MerchantScore.newBuilder().setError(true).build()))));
}