I'm using restassured and org.hamcrest.Matchers. I have the following response from my api
{
"entity" : {
"value" : 1.0
}
}
in my tests I have the following code
given()
.headers(createHeaders())
.when()
.get(url)
.prettyPeek()
.then()
.statusCode(HttpStatus.OK.value())
.body("entity.value", is(1.0));
Which is failing with message
java.lang.AssertionError: 1 expectation failed.
JSON path entity.value doesn't match.
Expected: is <1.0>
Actual: 1.0
What Matcher should I use in this code? On DTO level it is
BigDecimal value;