There are a number of query parameters contained in citrus_http_query_params but we just want to match on the just testId parameter.
Is there a way of extracting a single query parameter and matching on that?
I have seen that a custom MessageSelector can be created overriding the accept() method in the HeaderMatchingMessageSelector class which would give the ability to extract the testId parameter and test it's value.
However, the custom selector can only be used with a channel, I cannot see a way of using it with the HttpActionBuilder that I am using:
Just add the selector to the http receive operation. Citrus will automatically use the inbound channel and apply the message selector on that.
By the way the default HeaderMatchingMessageSelector should also support the usage of validation matchers where you can operate with contains matcher for example to match on one single query parameter to be present. With Hamcrest validation matchers you can add more complex matchers with and/or/allOf syntax.
You should be able to use Citrus validation matchers in header selector expressions. So you can use @contains@ or @matches@ implementations where latter is evaluating a regexp expression. Just use the validation matcher as the header selector value.