diff --git a/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java b/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java index 9f90caf6daf..e825b6ab657 100644 --- a/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java +++ b/optaplanner-test/src/main/java/org/optaplanner/test/impl/score/stream/DefaultSingleConstraintAssertion.java @@ -132,13 +132,13 @@ private void assertImpact(ScoreImpactType scoreImpactType, Number matchWeightTot if (actualScoreImpactType == ScoreImpactType.MIXED) { // Impact means we need to check for expected impact type and actual impact match. switch (scoreImpactType) { - case REWARD: + case PENALTY: Number negatedImpact = deducedImpacts.getValue(); if (equalityPredicate.test(matchWeightTotal, negatedImpact)) { return; } break; - case PENALTY: + case REWARD: if (equalityPredicate.test(matchWeightTotal, impact)) { return; }