public static boolean validateUpdateStatus(GlobalStatus before, GlobalStatus after) {
        if (isTimeoutGlobalStatus(before) && isCommitGlobalStatus(after)) {
            return false;
        }
        if (isCommitGlobalStatus(before) && isTimeoutGlobalStatus(after)) {
            return false;
        }
        if (isRollbackGlobalStatus(before) && isCommitGlobalStatus(after)) {
            return false;
        }
        if (isCommitGlobalStatus(before) && isRollbackGlobalStatus(after)) {
            return false;
        }
        return true;
    }
@Test
    public void testValidateUpdateStatus(){
        Assertions.assertTrue(SessionStatusValidator.validateUpdateStatus(GlobalStatus.Begin, GlobalStatus.Committing));
        Assertions.assertTrue(
            SessionStatusValidator.validateUpdateStatus(GlobalStatus.Committing, GlobalStatus.Committed));

        Assertions.assertFalse(
            SessionStatusValidator.validateUpdateStatus(GlobalStatus.Committing, GlobalStatus.TimeoutRollbacking));
        Assertions.assertFalse(
            SessionStatusValidator.validateUpdateStatus(GlobalStatus.TimeoutRollbacking, GlobalStatus.Committing));
        Assertions.assertFalse(
            SessionStatusValidator.validateUpdateStatus(GlobalStatus.Committing, GlobalStatus.Rollbacking));
        Assertions.assertFalse(
            SessionStatusValidator.validateUpdateStatus(GlobalStatus.Rollbacking, GlobalStatus.Committing));

        Assertions.assertFalse(
            SessionStatusValidator.validateUpdateStatus(GlobalStatus.Committed, GlobalStatus.Rollbacked));
        Assertions.assertFalse(
            SessionStatusValidator.validateUpdateStatus(GlobalStatus.Committed, GlobalStatus.TimeoutRollbacking));

    }