@Test
public void convert2Proto() {

    BranchRegisterResponse branchRegisterResponse = new BranchRegisterResponse();
    branchRegisterResponse.setTransactionExceptionCode(TransactionExceptionCode.GlobalTransactionNotActive);
    branchRegisterResponse.setResultCode(ResultCode.Failed);
    branchRegisterResponse.setMsg("msg");
    branchRegisterResponse.setBranchId(123);
    BranchRegisterResponseConvertor convertor = new BranchRegisterResponseConvertor();
    BranchRegisterResponseProto proto = convertor.convert2Proto(
        branchRegisterResponse);
    BranchRegisterResponse real = convertor.convert2Model(proto);
    assertThat(real.getTransactionExceptionCode()).isEqualTo(branchRegisterResponse.getTransactionExceptionCode());
    assertThat(real.getResultCode()).isEqualTo(branchRegisterResponse.getResultCode());
    assertThat(real.getMsg()).isEqualTo(branchRegisterResponse.getMsg());
    assertThat(real.getBranchId()).isEqualTo(branchRegisterResponse.getBranchId());
}