public Optional<PreparedCertificate> constructPreparedCertificate() {
    if (isPrepared()) {
      return Optional.of(
          new PreparedCertificate(
              proposalMessage.get().getSignedPayload().getPayload().getProposedBlock(),
              prepareMessages.stream().map(Prepare::getSignedPayload).collect(Collectors.toList()),
              roundIdentifier.getRoundNumber()));
    }
    return Optional.empty();
  }
Construct prepared certificate.

@return the optional prepared certificate
consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java