@Test
public void convert2Proto() {

    UndoLogDeleteRequest undoLogDeleteRequest = new UndoLogDeleteRequest();
    undoLogDeleteRequest.setBranchType(BranchType.AT);
    undoLogDeleteRequest.setResourceId(RESOURCE_ID);
    undoLogDeleteRequest.setSaveDays(SAVE_DAYS);
    UndoLogDeleteRequestConvertor undoLogDeleteRequestConvertor = new UndoLogDeleteRequestConvertor();
    UndoLogDeleteRequestProto proto = undoLogDeleteRequestConvertor.convert2Proto(
            undoLogDeleteRequest);
    UndoLogDeleteRequest realRequest = undoLogDeleteRequestConvertor.convert2Model(proto);
    assertThat(realRequest.getTypeCode()).isEqualTo(undoLogDeleteRequest.getTypeCode());
    assertThat(realRequest.getBranchType()).isEqualTo(undoLogDeleteRequest.getBranchType());
    assertThat(realRequest.getResourceId()).isEqualTo(undoLogDeleteRequest.getResourceId());
    assertThat(realRequest.getSaveDays()).isEqualTo(undoLogDeleteRequest.getSaveDays());
}