@Override
    public void clearUp(ProcessContext context) {
        RootContext.unbind();
        RootContext.unbindBranchType();
        if (sagaTransactionalTemplate != null) {
            GlobalTransaction globalTransaction;
            StateMachineInstance machineInstance =  (StateMachineInstance) context.getVariable(DomainConstants.VAR_NAME_STATEMACHINE_INST);
            if (machineInstance != null) {
                try {
                    globalTransaction = getGlobalTransaction(machineInstance, context);
                    sagaTransactionalTemplate.cleanUp(globalTransaction);
                } catch (ExecutionException e) {
                    LOGGER.error("Report transaction finish to server error: {}, StateMachine: {}, XID: {}, Reason: {}",
                            e.getCode(), machineInstance.getStateMachine().getName(), machineInstance.getId(), e.getMessage(), e);
                } catch (TransactionException e) {
                    LOGGER.error("Report transaction finish to server error: {}, StateMachine: {}, XID: {}, Reason: {}",
                            e.getCode(), machineInstance.getStateMachine().getName(), machineInstance.getId(), e.getMessage(), e);
                }
            }
        }
    }
@Test
    public void testClearUp() {
        ProcessContextImpl context = new ProcessContextImpl();
        context.setVariable(DomainConstants.VAR_NAME_STATEMACHINE_INST, new StateMachineInstanceImpl());
        Assertions.assertDoesNotThrow(() -> dbAndReportTcStateLogStore.clearUp(context));
    }