public void checkData(final Resilience4JHandle resilience4JHandle) {
        resilience4JHandle.setTimeoutDurationRate(resilience4JHandle.getTimeoutDurationRate() < 0 ? Constants.TIMEOUT_DURATION_RATE : resilience4JHandle.getTimeoutDurationRate());
        resilience4JHandle.setLimitRefreshPeriod(resilience4JHandle.getLimitRefreshPeriod() < 0 ? Constants.LIMIT_REFRESH_PERIOD : resilience4JHandle.getLimitRefreshPeriod());
        resilience4JHandle.setLimitForPeriod(resilience4JHandle.getLimitForPeriod() < 0 ? Constants.LIMIT_FOR_PERIOD : resilience4JHandle.getLimitForPeriod());
        resilience4JHandle.setCircuitEnable(resilience4JHandle.getCircuitEnable() != Constants.CIRCUIT_ENABLE ? Constants.CIRCUIT_DISABLE : Constants.CIRCUIT_ENABLE);
        resilience4JHandle.setTimeoutDuration(resilience4JHandle.getTimeoutDuration() < 0 ? Constants.TIMEOUT_DURATION : resilience4JHandle.getTimeoutDuration());
        resilience4JHandle.setFallbackUri(!"0".equals(resilience4JHandle.getFallbackUri()) ? resilience4JHandle.getFallbackUri() : "");
        resilience4JHandle.setSlidingWindowSize(resilience4JHandle.getSlidingWindowSize() < 0 ? Constants.SLIDING_WINDOW_SIZE : resilience4JHandle.getSlidingWindowSize());
        resilience4JHandle.setSlidingWindowType(resilience4JHandle.getSlidingWindowType() < 0 ? Constants.SLIDING_WINDOW_TYPE : resilience4JHandle.getSlidingWindowType());
        resilience4JHandle.setMinimumNumberOfCalls(resilience4JHandle.getMinimumNumberOfCalls() < 0 ? Constants.MINIMUM_NUMBER_OF_CALLS : resilience4JHandle.getMinimumNumberOfCalls());
        resilience4JHandle.setWaitIntervalFunctionInOpenState(resilience4JHandle.getWaitIntervalFunctionInOpenState() < 0
                ? Constants.WAIT_INTERVAL_FUNCTION_IN_OPEN_STATE : resilience4JHandle.getWaitIntervalFunctionInOpenState());
        resilience4JHandle.setPermittedNumberOfCallsInHalfOpenState(resilience4JHandle.getPermittedNumberOfCallsInHalfOpenState() < 0
                ? Constants.PERMITTED_NUMBER_OF_CALLS_IN_HALF_OPEN_STATE : resilience4JHandle.getPermittedNumberOfCallsInHalfOpenState());
        resilience4JHandle.setFailureRateThreshold(
                resilience4JHandle.getFailureRateThreshold() < 0 || resilience4JHandle.getFailureRateThreshold() > 100
                        ? Constants.FAILURE_RATE_THRESHOLD : resilience4JHandle.getFailureRateThreshold());
    }
@Test
    public void testCheckData() {
        Resilience4JHandle handle = new Resilience4JHandle();
        handle.setTimeoutDurationRate(-1);
        handle.setLimitRefreshPeriod(-2);
        handle.setLimitForPeriod(-3);
        handle.setCircuitEnable(-4);
        handle.setTimeoutDuration(-5);
        handle.setFallbackUri("uri");
        handle.setSlidingWindowSize(-6);
        handle.setSlidingWindowType(-7);
        handle.setMinimumNumberOfCalls(-8);
        handle.setWaitIntervalFunctionInOpenState(-9);
        handle.setPermittedNumberOfCallsInHalfOpenState(-10);
        handle.setFailureRateThreshold(-11);
        
        handle.checkData(handle);
    
        assertThat(handle.getTimeoutDurationRate(), is(Constants.TIMEOUT_DURATION_RATE));
        assertThat(handle.getLimitRefreshPeriod(), is(Constants.LIMIT_REFRESH_PERIOD));
        assertThat(handle.getLimitForPeriod(), is(Constants.LIMIT_FOR_PERIOD));
        assertThat(handle.getCircuitEnable(), is(Constants.CIRCUIT_DISABLE));
        assertThat(handle.getTimeoutDuration(), is(Constants.TIMEOUT_DURATION));
        assertThat(handle.getFallbackUri(), is("uri"));
        assertThat(handle.getSlidingWindowSize(), is(Constants.SLIDING_WINDOW_SIZE));
        assertThat(handle.getSlidingWindowType(), is(Constants.SLIDING_WINDOW_TYPE));
        assertThat(handle.getMinimumNumberOfCalls(), is(Constants.MINIMUM_NUMBER_OF_CALLS));
        assertThat(handle.getWaitIntervalFunctionInOpenState(), is(Constants.WAIT_INTERVAL_FUNCTION_IN_OPEN_STATE));
        assertThat(handle.getPermittedNumberOfCallsInHalfOpenState(), is(Constants.PERMITTED_NUMBER_OF_CALLS_IN_HALF_OPEN_STATE));
        assertThat(handle.getFailureRateThreshold(), is(Constants.FAILURE_RATE_THRESHOLD));
    }