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

    //GIVEN
    given(request.getHeader(CONTENT_TYPE_HEADER)).willReturn(HEADER_VAL_XML);
    parameterList.addParameter(new Parameter(TEXT_PLAIN, HEADER_VAL_XML));
    given(xQueryEvaluator.evaluateXQuery(anyString(), anyString())).willThrow(new SaxonApiException(""));
    //WHEN
    underTest.checkCondition(request, parameterList);
    //TNEN exception is thrown
}