@Test public void testEvaluateWhenOccurredAnExceptionInConditionEvaluation() { Exception e = new RuntimeException(); given(sequenceDescriptor.getName()).willReturn("test"); given(dialogDescriptor.getConditionDescriptor()).willReturn(conditionDescriptor); given(conditionDescriptor.getCondition()).willReturn(condition); given(conditionEvaluator.evaluate(condition, clonedRequest)).willThrow(e); List<ConditionDescriptor> cds = new ArrayList<>(); cds.add(conditionDescriptor); given(sequenceDescriptor.getConditionDescriptors()).willReturn(cds); given(sequenceDescriptor.getDialogDescriptors()).willReturn(new ArrayList<DialogDescriptor>()); boolean result = underTest.evaluate(request, sequenceDescriptor); Assert.assertFalse(result); }
public boolean evaluate(final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor) { boolean result = false; result = checkConditions(request, sequenceDescriptor, result); if (!result) { result = checkDialogDescriptors(request, sequenceDescriptor, result); } return result; }
SequenceDescriptorEvaluator { public boolean evaluate(final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor) { boolean result = false; result = checkConditions(request, sequenceDescriptor, result); if (!result) { result = checkDialogDescriptors(request, sequenceDescriptor, result); } return result; } }
SequenceDescriptorEvaluator { public boolean evaluate(final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor) { boolean result = false; result = checkConditions(request, sequenceDescriptor, result); if (!result) { result = checkDialogDescriptors(request, sequenceDescriptor, result); } return result; }  }
SequenceDescriptorEvaluator { public boolean evaluate(final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor) { boolean result = false; result = checkConditions(request, sequenceDescriptor, result); if (!result) { result = checkDialogDescriptors(request, sequenceDescriptor, result); } return result; }  boolean evaluate(final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor); }
SequenceDescriptorEvaluator { public boolean evaluate(final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor) { boolean result = false; result = checkConditions(request, sequenceDescriptor, result); if (!result) { result = checkDialogDescriptors(request, sequenceDescriptor, result); } return result; }  boolean evaluate(final WilmaHttpRequest request, final SequenceDescriptor sequenceDescriptor);  }