@Test
public void testFindResponseDescriptorWhenConditionThrowsExceptionShouldLogError() {

    //GIVEN
    NullPointerException nullPointerException = new NullPointerException();
    given(stubDescriptor.getDialogDescriptors()).willReturn(dialogDescriptors);
    given(dialogDescriptor.getConditionDescriptor()).willReturn(conditionDescriptor);
    given(dialogDescriptor.getAttributes().getName()).willReturn(DIALOG_DESCRIPTOR_NAME);
    given(conditionDescriptor.getCondition()).willReturn(condition);
    given(conditionEvaluator.evaluate(condition, clonedRequest)).willThrow(nullPointerException);
    given(stackTraceConverter.getStackTraceAsString(nullPointerException)).willReturn("error");
    Whitebox.setInternalState(underTest, "logger", logger);
    //WHEN
    underTest.findResponseDescriptor(stubDescriptors, request);
    //THEN
    verify(logger).error(Mockito.eq("Error during condition evaluation in the dialog descriptor 'dialog-descriptor'!"),
            Mockito.any(NullPointerException.class));
}