@Override
    public void handlerRule(final RuleData ruleData) {
        BasicAuthConfig basicAuthConfig = Singleton.INST.get(BasicAuthConfig.class);
        Optional.ofNullable(ruleData.getHandle()).ifPresent(ruleHandle -> {
            BasicAuthRuleHandle basicAuthRuleHandle = BasicAuthRuleHandle.newInstance(StringUtils.defaultString(ruleHandle, basicAuthConfig.getDefaultHandleJson()));
            CACHED_HANDLE.get().cachedHandle(CacheKeyUtils.INST.getKey(ruleData), basicAuthRuleHandle);
        });
    }
@Test
    public void testHandlerRule() {
        RuleData ruleData = new RuleData();
        ruleData.setId("basicAuthRule");
        ruleData.setSelectorId("basicAuth");
        String handleJson = "{\"authorization\":\"test:test123\"}";
        ruleData.setHandle(handleJson);
        basicAuthPluginDataHandler.handlerPlugin(new PluginData("pluginId", "pluginName", "{\"defaultHandleJson\":\"test:test123\"}", "0", false, null));
        basicAuthPluginDataHandler.handlerRule(ruleData);
        Map<String, String> map = GsonUtils.getInstance().toObjectMap(handleJson, String.class);
        assertEquals(map.get("authorization"), ((DefaultBasicAuthRuleHandle) BasicAuthPluginDataHandler.CACHED_HANDLE.get().obtainHandle(CacheKeyUtils.INST.getKey(ruleData))).getAuthorization());
    }