@Test
public void convert2Proto() {

    GlobalLockQueryRequest globalLockQueryRequest = new GlobalLockQueryRequest();
    globalLockQueryRequest.setApplicationData("data");
    globalLockQueryRequest.setBranchType(BranchType.AT);
    globalLockQueryRequest.setLockKey("localKey");
    globalLockQueryRequest.setResourceId("resourceId");
    globalLockQueryRequest.setXid("xid");
    GlobalLockQueryRequestConvertor convertor = new GlobalLockQueryRequestConvertor();
    GlobalLockQueryRequestProto proto = convertor.convert2Proto(
        globalLockQueryRequest);
    GlobalLockQueryRequest real = convertor.convert2Model(proto);
    assertThat(real.getTypeCode()).isEqualTo(globalLockQueryRequest.getTypeCode());
    assertThat(real.getApplicationData()).isEqualTo(globalLockQueryRequest.getApplicationData());
    assertThat(real.getXid()).isEqualTo(globalLockQueryRequest.getXid());
    assertThat(real.getBranchType()).isEqualTo(globalLockQueryRequest.getBranchType());
    assertThat(real.getLockKey()).isEqualTo(globalLockQueryRequest.getLockKey());
    assertThat(real.getResourceId()).isEqualTo(globalLockQueryRequest.getResourceId());
}