@Test
public void convert2Proto() {

    BranchReportRequest branchReportRequest = new BranchReportRequest();
    branchReportRequest.setApplicationData("data");
    branchReportRequest.setBranchId(123);
    branchReportRequest.setResourceId("resourceId");
    branchReportRequest.setXid("xid");
    branchReportRequest.setBranchType(
        BranchType.AT);
    branchReportRequest.setStatus(BranchStatus.PhaseOne_Done);
    BranchReportRequestConvertor convertor = new BranchReportRequestConvertor();
    BranchReportRequestProto proto = convertor.convert2Proto(branchReportRequest);
    BranchReportRequest real = convertor.convert2Model(proto);
    assertThat(real.getBranchType()).isEqualTo(branchReportRequest.getBranchType());
    assertThat(real.getXid()).isEqualTo(branchReportRequest.getXid());
    assertThat(real.getResourceId()).isEqualTo(branchReportRequest.getResourceId());
    assertThat(real.getBranchId()).isEqualTo(branchReportRequest.getBranchId());
    assertThat(real.getApplicationData()).isEqualTo(branchReportRequest.getApplicationData());
    assertThat(real.getStatus()).isEqualTo(branchReportRequest.getStatus());
}