@Test
public void convert2Proto() {

    RegisterTMRequest registerRMRequest = new RegisterTMRequest();
    registerRMRequest.setVersion("123");
    registerRMRequest.setTransactionServiceGroup("group");
    registerRMRequest.setExtraData("extraData");
    registerRMRequest.setApplicationId("appId");
    RegisterTMRequestConvertor convertor = new RegisterTMRequestConvertor();
    RegisterTMRequestProto proto = convertor.convert2Proto(registerRMRequest);
    RegisterTMRequest real = convertor.convert2Model(proto);
    assertThat((real.getTypeCode())).isEqualTo(registerRMRequest.getTypeCode());
    assertThat((real.getVersion())).isEqualTo(registerRMRequest.getVersion());
    assertThat((real.getTransactionServiceGroup())).isEqualTo(registerRMRequest.getTransactionServiceGroup());
    assertThat((real.getExtraData())).isEqualTo(registerRMRequest.getExtraData());
    assertThat((real.getApplicationId())).isEqualTo(registerRMRequest.getApplicationId());
}