void checkFlow(ResourceWrapper resource, Context context, DefaultNode node, int count, boolean prioritized)
        throws BlockException {
        checker.checkFlow(ruleProvider, resource, context, node, count, prioritized);
    }
@Test(expected = FlowException.class)
    @SuppressWarnings("unchecked")
    public void testCheckFlowBlock() throws Exception {
        FlowRuleChecker checker = mock(FlowRuleChecker.class);
        FlowSlot flowSlot = new FlowSlot(checker);
        Context context = mock(Context.class);
        DefaultNode node = mock(DefaultNode.class);
        doCallRealMethod().when(checker).checkFlow(any(Function.class), any(ResourceWrapper.class), any(Context.class),
            any(DefaultNode.class), anyInt(), anyBoolean());

        String resA = "resAK";
        FlowRule rule = new FlowRule(resA).setCount(10);
        FlowRuleManager.loadRules(Collections.singletonList(rule));

        when(checker.canPassCheck(any(FlowRule.class), any(Context.class), any(DefaultNode.class), anyInt(), anyBoolean()))
            .thenReturn(false);

        flowSlot.checkFlow(new StringResourceWrapper(resA, EntryType.IN), context, node, 1, false);
    }