@Override
    public void handlerRule(final RuleData ruleData) {
        Optional.ofNullable(ruleData.getHandle()).ifPresent(s -> {
            final WafHandle wafHandle = GsonUtils.getInstance().fromJson(s, WafHandle.class);
            CACHED_HANDLE.get().cachedHandle(CacheKeyUtils.INST.getKey(ruleData), wafHandle);
        });
    }
@Test
    public void testHandlerRule() {
        RuleData ruleData = new RuleData();
        ruleData.setId("wafRule");
        ruleData.setSelectorId("waf");
        WafHandle wafHandle = new WafHandle();
        wafHandle.setPermission("false");
        wafHandle.setStatusCode("0");
        ruleData.setHandle(GsonUtils.getGson().toJson(wafHandle));
        wafPluginDataHandlerUnderTest.handlerRule(ruleData);
        assertEquals(wafHandle.getPermission(), WafPluginDataHandler.CACHED_HANDLE.get().obtainHandle(CacheKeyUtils.INST.getKey(ruleData)).getPermission());
        wafPluginDataHandlerUnderTest.removeRule(ruleData);
        assertNull(WafPluginDataHandler.CACHED_HANDLE.get().obtainHandle(CacheKeyUtils.INST.getKey(ruleData)));
    }