@Override
    public Optional<ResultDecorator<MaskRule>> newInstance(final RuleMetaData globalRuleMetaData, final ShardingSphereDatabase database,
                                                           final MaskRule maskRule, final ConfigurationProperties props, final SQLStatementContext sqlStatementContext) {
        return sqlStatementContext instanceof SelectStatementContext ? Optional.of(new MaskDQLResultDecorator(maskRule, (SelectStatementContext) sqlStatementContext)) : Optional.empty();
    }
@Test
    void assertNewInstanceWithSelectStatement() {
        MaskResultDecoratorEngine engine = (MaskResultDecoratorEngine) OrderedSPILoader.getServices(ResultProcessEngine.class, Collections.singleton(rule)).get(rule);
        Optional<ResultDecorator<MaskRule>> actual =
                engine.newInstance(mock(RuleMetaData.class), database, rule, mock(ConfigurationProperties.class), mock(SelectStatementContext.class, RETURNS_DEEP_STUBS));
        assertTrue(actual.isPresent());
        assertThat(actual.get(), instanceOf(MaskDQLResultDecorator.class));
    }