@Test
public void convert2Proto() {

    GlobalRollbackResponse globalRollbackResponse = new GlobalRollbackResponse();
    globalRollbackResponse.setGlobalStatus(GlobalStatus.AsyncCommitting);
    globalRollbackResponse.setMsg("msg");
    globalRollbackResponse.setResultCode(ResultCode.Failed);
    globalRollbackResponse.setTransactionExceptionCode(TransactionExceptionCode.BranchRegisterFailed);
    GlobalRollbackResponseConvertor convertor = new GlobalRollbackResponseConvertor();
    GlobalRollbackResponseProto proto = convertor.convert2Proto(
        globalRollbackResponse);
    GlobalRollbackResponse real = convertor.convert2Model(proto);
    assertThat((real.getTypeCode())).isEqualTo(globalRollbackResponse.getTypeCode());
    assertThat((real.getMsg())).isEqualTo(globalRollbackResponse.getMsg());
    assertThat((real.getResultCode())).isEqualTo(globalRollbackResponse.getResultCode());
    assertThat((real.getTransactionExceptionCode())).isEqualTo(
        globalRollbackResponse.getTransactionExceptionCode());
}