@Override
    public void recordStateMachineRestarted(StateMachineInstance machineInstance, ProcessContext context) {

        if (machineInstance != null) {
            //save to db
            Date gmtUpdated = new Date();
            int effect = executeUpdate(stateLogStoreSqls.getUpdateStateMachineRunningStatusSql(dbType), machineInstance.isRunning(), new Timestamp(gmtUpdated.getTime()),
                    machineInstance.getId(), new Timestamp(machineInstance.getGmtUpdated().getTime()));
            if (effect < 1) {
                throw new EngineExecutionException(
                        "StateMachineInstance [id:" + machineInstance.getId() + "] is recovered by an other execution, restart denied", FrameworkErrorCode.OperationDenied);
            }
            machineInstance.setGmtUpdated(gmtUpdated);
        }
    }
@Test
    public void testRecordStateMachineRestarted() {
        DbAndReportTcStateLogStore dbAndReportTcStateLogStore = new DbAndReportTcStateLogStore();
        StateMachineInstanceImpl stateMachineInstance = new StateMachineInstanceImpl();
        ProcessContextImpl context = new ProcessContextImpl();
        context.setVariable(DomainConstants.VAR_NAME_STATEMACHINE_CONFIG,  new DbStateMachineConfig());
        Assertions.assertThrows(NullPointerException.class,
                () -> dbAndReportTcStateLogStore.recordStateMachineRestarted(stateMachineInstance, context));
    }