@Test(expected = Ex.CachedValueMismatch.class)
public void badTotalValueField() throws Exception {

    // We require the pledge to (redundantly) specify the total value of all inputs, even though we check it
    // and calculate it by requesting the UTXOs, because that way once checked we can just save the pledge
    // message in a way that says it was validated and not have to look up UTXOs again in future, or wrap it
    // with extra data.
    TxData pledgeTX = makePledge(details, 0.1);
    LHProtos.Pledge.Builder pledge = pledgeToBuilder(pledgeTX, true);
    Project project = new Project(projectBuilder.build());
    List<TransactionOutput> outputs = ImmutableList.of(pledgeTX.fakeStub.getOutput(0).duplicateDetached());
    checkedGet(project.verifyPledge(outPoints -> completedFuture(outputs), pledge.build()));
}