@Test
public void testCheckConditionWhenElementExistsShouldReturnTrue() throws SaxonApiException {

    //GIVEN
    parameterList.addParameter(new Parameter("xquery", QUERY));
    given(request.getHeader(CONTENT_TYPE_HEADER)).willReturn(XML_CONTENT);
    given(request.getBody()).willReturn(BODY);
    given(queryExpressionEvaluator.evaluateXQuery(BODY, QUERY)).willReturn(XML_DECLARATION + "true");
    //WHEN
    boolean actual = underTest.checkCondition(request, parameterList);
    //THEN
    assertEquals(actual, true);
}