protected void declareRuleFromCharacteristic(final Characteristic characteristic, final String parentPath,
                                                 final List<KiePMMLDroolsRule> rules,
                                                 final String statusToSet,
                                                 final boolean isLastCharacteristic) {
        logger.trace("declareRuleFromCharacteristic {} {}", characteristic, parentPath);
        String currentRule = String.format(PATH_PATTERN, parentPath, characteristic.getName());
        final List<Attribute> attributes = characteristic.getAttributes();
        for (int i = 0; i < attributes.size(); i++) {
            declareRuleFromAttribute(attributes.get(i), currentRule, i, rules, statusToSet, characteristic.getReasonCode(), characteristic.getBaselineScore(), isLastCharacteristic);
        }
    }
@Test
    void declareRuleFromCharacteristicNotLastCharacteristic() {
        Characteristic characteristic = getCharacteristic();
        final String parentPath = "parent_path";
        final List<KiePMMLDroolsRule> rules = new ArrayList<>();
        final String statusToSet = "status_to_set";
        final boolean isLastCharacteristic = false;
        String[] expectedConstraints = {"value <= 5.0", "value >= 5.0 && value < 12.0"};
        int[] expectedOperatorValuesSizes = {1, 2};
        getKiePMMLScorecardModelCharacteristicASTFactory()
                .declareRuleFromCharacteristic(characteristic,
                        parentPath,
                        rules,
                        statusToSet,
                        isLastCharacteristic);
        assertThat(rules).hasSameSizeAs(characteristic.getAttributes());
        for (int i = 0; i < rules.size(); i++) {
            commonValidateRule(rules.get(i),
                    characteristic.getAttributes().get(i),
                    statusToSet,
                    parentPath + "_AgeScore",
                    i,
                    isLastCharacteristic,
                    1,
                    null,
                    BOOLEAN_OPERATOR.AND,
                    expectedConstraints[i],
                    expectedOperatorValuesSizes[i]
            );
        }
    }