### Question:
PbftMessage implements ConsensusMessage<PbftMessage> { @Override public JsonObject toJsonObject() { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("type", this.type); jsonObject.addProperty("viewNumber", this.viewNumber); jsonObject.addProperty("seqNumber", this.seqNumber); jsonObject.addProperty("hash", Hex.toHexString(this.hash)); if (this.result != null) { jsonObject.addProperty("result", Hex.toHexString(this.result)); } jsonObject.addProperty("signature", Hex.toHexString(this.signature)); if (this.block != null) { jsonObject.add("block", this.block.toJsonObject()); } return jsonObject; } PbftMessage(String type,
                       long viewNumber,
                       long seqNumber,
                       Sha3Hash hash,
                       byte[] result,
                       byte[] signature,
                       Block block);  PbftMessage(String type,
                       long viewNumber,
                       long seqNumber,
                       Sha3Hash hash,
                       byte[] result,
                       Wallet wallet,
                       Block block);  PbftMessage(byte[] bytes);  PbftMessage(PbftProto.PbftMessage protoPbftMessage);  PbftMessage(JsonObject jsonObject); @Override String getType(); @Override long getViewNumber(); @Override long getSeqNumber(); @Override byte[] getHash(); @Override String getHashHex(); @Override byte[] getHashForSigning(); @Override byte[] getResult(); @Override byte[] getSignature(); @Override String getSignatureHex(); @Override @JsonIgnore byte[] getAddress(); @Override @JsonIgnore String getAddressHex(); @Override @JsonIgnore Block getBlock(); @Override byte[] toBinary(); @Override byte[] sign(Wallet wallet); @Override JsonObject toJsonObject(); static List<PbftMessage> toPbftMessageList(
            PbftProto.PbftMessageList protoPbftMessageList); static PbftProto.PbftMessage toProto(PbftMessage pbftMessage); static PbftProto.PbftMessageList toProtoList(Collection<PbftMessage> pbftMessageList); @Override boolean equals(Object o); @Override int hashCode(); void clear(); PbftMessage clone();  }### Answer:
@Test public void constructorTest_JsonObect() { JsonObject prePrepareJsonObject = prePrepare.toJsonObject(); PbftMessage prePrepare = new PbftMessage(prePrepareJsonObject); log.debug(prePrepare.toJsonObject().toString()); assertEquals(prePrepare, this.prePrepare); JsonObject prepareJsonObject = prepare.toJsonObject(); PbftMessage prepare = new PbftMessage(prepareJsonObject); log.debug(prepare.toJsonObject().toString()); assertEquals(prepare, this.prepare); JsonObject commitJsonObject = commit.toJsonObject(); PbftMessage commit = new PbftMessage(commitJsonObject); log.debug(commit.toJsonObject().toString()); assertEquals(commit, this.commit); JsonObject viewChangeJsonObject = viewChange.toJsonObject(); PbftMessage viewChange = new PbftMessage(viewChangeJsonObject); log.debug(viewChange.toJsonObject().toString()); assertEquals(viewChange, this.viewChange); }