### Question:
ProposalBlockConsistencyValidator { public boolean validateProposalMatchesBlock( final SignedData<ProposalPayload> signedPayload, final Block proposedBlock) { if (!signedPayload.getPayload().getDigest().equals(proposedBlock.getHash())) { LOG.info("Invalid Proposal, embedded digest does not match block's hash."); return false; } if (proposedBlock.getHeader().getNumber() != signedPayload.getPayload().getRoundIdentifier().getSequenceNumber()) { LOG.info("Invalid proposal/block - message sequence does not align with block number."); return false; } if (!validateBlockMatchesProposalRound(signedPayload.getPayload(), proposedBlock)) { return false; } return true; }  boolean validateProposalMatchesBlock(
      final SignedData<ProposalPayload> signedPayload, final Block proposedBlock);  }### Answer:
@Test public void blockDigestMisMatchWithMessageRoundFails() { final Proposal proposalMsg = proposerMessageFactory.createProposal(roundIdentifier, block, Optional.empty()); final Block misMatchedBlock = IbftBlockInterface.replaceRoundInBlock( block, roundIdentifier.getRoundNumber() + 1, IbftBlockHeaderFunctions.forCommittedSeal()); assertThat( consistencyChecker.validateProposalMatchesBlock( proposalMsg.getSignedPayload(), misMatchedBlock)) .isFalse(); }
@Test public void blockDigestMatchesButRoundDiffersFails() { final ConsensusRoundIdentifier futureRound = TestHelpers.createFrom(roundIdentifier, 0, +1); final Proposal proposalMsg = proposerMessageFactory.createProposal(futureRound, block, Optional.empty()); assertThat( consistencyChecker.validateProposalMatchesBlock(proposalMsg.getSignedPayload(), block)) .isFalse(); }
@Test public void blockWithMismatchedNumberFails() { final ConsensusRoundIdentifier futureHeight = TestHelpers.createFrom(roundIdentifier, +1, 0); final Proposal proposalMsg = proposerMessageFactory.createProposal(futureHeight, block, Optional.empty()); assertThat( consistencyChecker.validateProposalMatchesBlock(proposalMsg.getSignedPayload(), block)) .isFalse(); }