@Test
public void convert2Proto() {

    GlobalStatusResponse globalStatusResponse = new GlobalStatusResponse();
    globalStatusResponse.setGlobalStatus(GlobalStatus.AsyncCommitting);
    globalStatusResponse.setMsg("msg");
    globalStatusResponse.setResultCode(ResultCode.Failed);
    globalStatusResponse.setTransactionExceptionCode(TransactionExceptionCode.BranchRegisterFailed);
    GlobalStatusResponseConvertor convertor = new GlobalStatusResponseConvertor();
    GlobalStatusResponseProto proto = convertor.convert2Proto(
        globalStatusResponse);
    GlobalStatusResponse real = convertor.convert2Model(proto);
    assertThat((real.getTypeCode())).isEqualTo(globalStatusResponse.getTypeCode());
    assertThat((real.getMsg())).isEqualTo(globalStatusResponse.getMsg());
    assertThat((real.getResultCode())).isEqualTo(globalStatusResponse.getResultCode());
    assertThat((real.getTransactionExceptionCode())).isEqualTo(
        globalStatusResponse.getTransactionExceptionCode());
}