@Test
public void convert2Proto() {

    GlobalCommitResponse globalCommitResponse = new GlobalCommitResponse();
    globalCommitResponse.setGlobalStatus(GlobalStatus.AsyncCommitting);
    globalCommitResponse.setMsg("msg");
    globalCommitResponse.setResultCode(ResultCode.Failed);
    globalCommitResponse.setTransactionExceptionCode(TransactionExceptionCode.BranchRegisterFailed);
    GlobalCommitResponseConvertor convertor = new GlobalCommitResponseConvertor();
    GlobalCommitResponseProto proto = convertor.convert2Proto(globalCommitResponse);
    GlobalCommitResponse real = convertor.convert2Model(proto);
    assertThat((real.getTypeCode())).isEqualTo(globalCommitResponse.getTypeCode());
    assertThat((real.getMsg())).isEqualTo(globalCommitResponse.getMsg());
    assertThat((real.getResultCode())).isEqualTo(globalCommitResponse.getResultCode());
    assertThat((real.getTransactionExceptionCode())).isEqualTo(globalCommitResponse.getTransactionExceptionCode());
}