Affects: 5.3.21
The current API for MockRestServiceServer and MockRestRequestMatchers does not allow a test to validate that all values of a certain header key satisfy a matcher. Trying to do
.andExpect(header("Accept", endsWith("json")))
does not work because it passes if the first value for the header ends with "json". I would like to be able to do something like this:
.andExpect(header("Accept", allMatch(endsWith("json"))))
or something to that effect.
Affects: 5.3.21
The current API for
MockRestServiceServerandMockRestRequestMatchersdoes not allow a test to validate that all values of a certain header key satisfy a matcher. Trying to dodoes not work because it passes if the first value for the header ends with
"json". I would like to be able to do something like this:or something to that effect.