I am practicing MockMVC for rest call unit testing. how can we test the Boolean values so that whether the result is true or false I need to pass the test, I tried as follows,
mockMvc.perform(get("/student/{Id}", 1L)).
.andExpect(status().isOk())
.andExpect(jsonPath("$.isPass", is(true || false)));
Also I have list with 6 values, how can use list contains all kind of method,
.andExpect(jsonPath("$.subjectList", hasSize(5)))
.andExpect(jsonPath("$.subjectList.name", Matchers.contains("English", "Hindi", "France", "Tamil", "Bengali"))
Any suggestions please!!