Matching object in JSON with jsonpath in Spring Boot Test
I'm trying to write unit tests for a rest endpoint with Spring Boot Test that's going well but when I try to assert on an object in the json response with jsonPath an AssertionError is thrown even when contents are identical and the same. Sample Json { "status": 200, "data": [ { "id": 1, "placed_by": 1, "weight": 0.1, "weight_metric": "KG", "sent_on": null, "delivered_on": null, "status": "PLACED", "from": "1 string, string, string, string", "to": "1 string, string, string, string", "current_location": "1 string, string, string, string" } ] } Code in Kotlin mockMvc.perform( get("/api/v1/stuff"