@Override
    public void handlerRule(final RuleData ruleData) {
        Optional.ofNullable(ruleData.getHandle()).ifPresent(s -> {
            final KeyAuthRuleHandle ruleHandle = GsonUtils.getInstance().fromJson(s, KeyAuthRuleHandle.class);
            CACHED_HANDLE.get().cachedHandle(CacheKeyUtils.INST.getKey(ruleData), ruleHandle);
        });
    }
@Test
    public void testHandlerRule() {
        RuleData ruleData = new RuleData();
        ruleData.setId("keyAuthRule");
        ruleData.setSelectorId("keyAuth");
        ruleData.setHandle(handleString);
        keyAuthPluginDataHandler.handlerRule(ruleData);

        KeyAuthRuleHandle testRuleHandle = KeyAuthPluginDataHandler.CACHED_HANDLE.get().obtainHandle(CacheKeyUtils.INST.getKey(ruleData));
        assertTrue(StringUtils.equals(testRuleHandle.getKeyName(), "apiKey"));
        assertTrue(StringUtils.equals(testRuleHandle.getKey(), "key"));
    }