@Test(expectedExceptions = ConditionEvaluationFailedException.class)
public void testCheckConditionWhenErrorDuringXqueryExecutionShouldThrowException() throws SaxonApiException {

    //GIVEN in setUp
    parameterList.addParameter(new Parameter(NODE + "/@" + ATTRIBUTE, VALUE));
    String query = "//*[name()='" + NODE + "']/@" + ATTRIBUTE + "='" + VALUE + "'";
    given(queryExpressionEvaluator.evaluateXQuery(REQUEST, query)).willThrow(new SaxonApiException("exception"));
    given(request.getBody()).willReturn(REQUEST);
    given(request.getHeader(CONTENT_TYPE_HEADER)).willReturn(XML_CONTENT);
    //WHEN
    underTest.checkCondition(request, parameterList);
    //THEN exception should be thrown
}