@Override
    public void checkBeforeUpdate(final CreateEncryptRuleStatement sqlStatement) {
        if (!sqlStatement.isIfNotExists()) {
            checkDuplicateRuleNames(sqlStatement);
        }
        checkColumnNames(sqlStatement);
        checkAlgorithmTypes(sqlStatement);
        checkToBeCreatedEncryptors(sqlStatement);
        checkDataSources();
    }
@Test
    void assertCheckSQLStatementWithDuplicateEncryptRule() {
        EncryptRule rule = mock(EncryptRule.class);
        when(rule.getAllTableNames()).thenReturn(Arrays.asList("t_user", "t_order"));
        executor.setRule(rule);
        assertThrows(DuplicateRuleException.class, () -> executor.checkBeforeUpdate(createSQLStatement(false, "MD5")));
    }