@Test
public void testConflictingMatchCombination() throws ParseException {
SuggestionCompletionEngine sce = buildSuggestionCompletionEngine();
GuidedDecisionTable52 dt = new GuidedDecisionTable52();
Pattern52 driverPattern = new Pattern52();
driverPattern.setBoundName("driverPattern");
driverPattern.setFactType("Driver");
ConditionCol52 ageMinimum = new ConditionCol52();
ageMinimum.setFactField("age");
ageMinimum.setOperator(">=");
ageMinimum.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
driverPattern.getChildColumns().add(ageMinimum);
ConditionCol52 ageMaximum = new ConditionCol52();
ageMaximum.setFactField("age");
ageMaximum.setOperator("<=");
ageMaximum.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
driverPattern.getChildColumns().add(ageMaximum);
ConditionCol52 approved = new ConditionCol52();
approved.setFactField("approved");
approved.setOperator("==");
approved.setConstraintValueType(BaseSingleFieldConstraint.TYPE_LITERAL);
driverPattern.getChildColumns().add(approved);
dt.getConditions().add(driverPattern);
ActionSetFieldCol52 message = new ActionSetFieldCol52();
message.setBoundName("m");
message.setFactField("message");
dt.getActionCols().add(message);
@SuppressWarnings("unchecked")
List<List<DTCellValue52>> data = Arrays.asList(
Arrays.asList(
new DTCellValue52(1),
new DTCellValue52("Row 1 description"),
new DTCellValue52((Integer) null),
new DTCellValue52(new Integer("20")),
new DTCellValue52(Boolean.TRUE),
new DTCellValue52("Row 1 message")
),
Arrays.asList(
new DTCellValue52(2),
new DTCellValue52("Row 2 description"),
new DTCellValue52(new Integer("21")),
new DTCellValue52(new Integer("40")),
new DTCellValue52(Boolean.TRUE),
new DTCellValue52("Row 2 message")
),
Arrays.asList(
new DTCellValue52(3),
new DTCellValue52("Row 3 description"),
new DTCellValue52(new Integer("41")),
new DTCellValue52((Integer) null),
new DTCellValue52(Boolean.TRUE),
new DTCellValue52("Row 3 message")
),
Arrays.asList(
new DTCellValue52(4),
new DTCellValue52("Row 4 description"),
new DTCellValue52((Integer) null),
new DTCellValue52(new Integer("25")),
new DTCellValue52(Boolean.FALSE),
new DTCellValue52("Row 4 message")
),
Arrays.asList(
new DTCellValue52(5),
new DTCellValue52("Row 5 description"),
new DTCellValue52(new Integer("26")),
new DTCellValue52(new Integer("60")),
new DTCellValue52(Boolean.FALSE),
new DTCellValue52("Row 5 message")
),
Arrays.asList(
new DTCellValue52(6),
new DTCellValue52("Row 6 description"),
new DTCellValue52(new Integer("50")),
new DTCellValue52((Integer) null),
new DTCellValue52(Boolean.FALSE),
new DTCellValue52("Row 6 message")
)
);
dt.setData(data);
DecisionTableAnalyzer analyzer = new DecisionTableAnalyzer(sce);
List<Analysis> analysisData = analyzer.analyze(dt);
assertEquals(data.size(), analysisData.size());