public void checkData() {
        this.setFlowRuleEnable((this.getFlowRuleEnable() == Constants.FLOW_RULE_ENABLE_ON || this.getFlowRuleEnable() == Constants.FLOW_RULE_ENABLE_OFF)
                ? this.getFlowRuleEnable() : Constants.SENTINEL_ENABLE_FLOW_RULE);
        this.setDegradeRuleEnable((this.getDegradeRuleEnable() == Constants.DEGRADE_RULE_ENABLE_ON || this.getDegradeRuleEnable() == Constants.DEGRADE_RULE_ENABLE_OFF)
                ? this.getDegradeRuleEnable() : Constants.SENTINEL_ENABLE_DEGRADE_RULE);
    }
@Test
    public void testCheckData() {
        SentinelHandle handle = new SentinelHandle();
        handle.setFlowRuleEnable(0);
        handle.setDegradeRuleEnable(1);
        
        handle.checkData();
        
        assertThat(handle.getFlowRuleEnable(), is(0));
        assertThat(handle.getDegradeRuleEnable(), is(1));
    
        handle.setFlowRuleEnable(-1);
        handle.setDegradeRuleEnable(3);
    
        handle.checkData();
        
        assertThat(handle.getFlowRuleEnable(), is(Constants.SENTINEL_ENABLE_FLOW_RULE));
        assertThat(handle.getDegradeRuleEnable(), is(Constants.SENTINEL_ENABLE_DEGRADE_RULE));
    }