protected void commonDeclarePatternWithConstraint(final CEDescrBuilder<?, ?> descrBuilder, final String patternType, final String constraintString) {
        descrBuilder.pattern(patternType).constraint(constraintString);
    }
@Test
    void commonDeclarePatternWithConstraint() {
        String patternType = "TEMPERATURE";
        String constraintsString = "value < 35";
        final CEDescrBuilder<CEDescrBuilder<CEDescrBuilder<RuleDescrBuilder, AndDescr>, NotDescr>, ExistsDescr> existsBuilder = lhsBuilder.not().exists();
        KiePMMLDescrLhsFactory.factory(lhsBuilder).commonDeclarePatternWithConstraint(existsBuilder, patternType,
                constraintsString);
        assertThat(existsBuilder.getDescr()).isNotNull();
        final List<BaseDescr> descrs = existsBuilder.getDescr().getDescrs();
        assertThat(descrs).isNotNull();
        assertThat(descrs).hasSize(1);
        assertThat(descrs.get(0)).isInstanceOf(PatternDescr.class);
        PatternDescr patternDescr = (PatternDescr) descrs.get(0);
        assertThat(patternDescr.getObjectType()).isEqualTo(patternType);
        assertThat(patternDescr.getIdentifier()).isNull();
        assertThat(patternDescr.getConstraint()).isInstanceOf(AndDescr.class);
        AndDescr andDescr = (AndDescr) patternDescr.getConstraint();
        assertThat(andDescr.getDescrs()).hasSize(1);
        assertThat(andDescr.getDescrs().get(0)).isInstanceOf(ExprConstraintDescr.class);
        ExprConstraintDescr exprConstraintDescr = (ExprConstraintDescr) andDescr.getDescrs().get(0);
        assertThat(exprConstraintDescr.isNegated()).isFalse();
        assertThat(exprConstraintDescr.getType()).isEqualTo(ExprConstraintDescr.Type.NAMED);
        assertThat(exprConstraintDescr.getExpression()).isEqualTo(constraintsString);
    }