@Test
public void reportFraudThenMerchantTest() {

    FunctionTestHarness harness = FunctionTestHarness.test(ignore -> new TransactionManager(), MANAGER_FN, "id");
    harness.invoke(TRANSACTION);
    FeatureVector expectedVector = FeatureVector.newBuilder().setAmount(AMOUNT).setFraudCount(1).setMerchantScore(1).build();
    Assert.assertThat(harness.invoke(ReportedFraud.newBuilder().setCount(1).build()), sentNothing());
    Assert.assertThat(
        harness.invoke(MerchantScore.newBuilder().setScore(1).build()),
        sent(
            messagesTo(
                new Address(MODEL_FN, ACCOUNT),
                equalTo(Any.pack(expectedVector)))));
}