@Test(expectedExceptions = ConditionEvaluationFailedException.class) public void testCheckConditionShouldThrowExceptionWhenTooMuchParametersAreDefinedInConfig() { given(request.getHeader(CONTENT_TYPE_HEADER)).willReturn(HEADER_VAL_FASTINFOSET); parameterList.addParameter(new Parameter(TEXT_PLAIN, HEADER_VAL_XML)); parameterList.addParameter(new Parameter(CONTENT_TYPE_HEADER, HEADER_VAL_XML)); underTest.checkCondition(request, parameterList); }
@Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; } }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }  }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }  @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList); }
XmlMessageTypeChecker implements ConditionChecker { @Override public boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList) { boolean result = false; String contentType = request.getHeader(CONTENT_TYPE_HEADER); if (checkContentTypeIsXml(contentType)) { result = Boolean.valueOf(evaluateQueryWithParamCheck(request, parameterList)); } return result; }  @Override boolean checkCondition(final WilmaHttpRequest request, final ParameterList parameterList);  }