File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
backend/src/test/java/de/amos/apachepulsarui/controller Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 2121import java .util .Set ;
2222
2323import static java .util .Collections .emptyList ;
24- import static org .hamcrest .Matchers .equalTo ;
24+ import static org .hamcrest .Matchers .containsInAnyOrder ;
2525import static org .hamcrest .Matchers .hasSize ;
2626import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
2727import static org .springframework .test .web .servlet .result .MockMvcResultMatchers .jsonPath ;
@@ -49,8 +49,7 @@ void getMessages_returnsMessages() throws Exception {
4949 .contentType (MediaType .APPLICATION_JSON ))
5050 .andExpect (status ().isOk ())
5151 .andExpect (jsonPath ("$.messages" , hasSize (2 )))
52- .andExpect (jsonPath ("$.messages[0].payload" , equalTo ("Nebuchadnezzar" )))
53- .andExpect (jsonPath ("$.messages[1].payload" , equalTo ("Serenity" )));
52+ .andExpect (jsonPath ("$.messages[*].payload" , containsInAnyOrder ("Nebuchadnezzar" , "Serenity" )));
5453 }
5554
5655 @ Test
You can’t perform that action at this time.
0 commit comments