I have to get a max value for userId using RestAssured and Gpath syntax. I dont know what i should type in body after then.
I have tried so many ways but it does not work.
@BeforeClass
public void setUp() {
endpoint = "https://jsonplaceholder.typicode.com/posts/";
}
public static Response getJsonPath(String endpoint) {
return
when().
get(endpoint).
then().
statusCode(200).
contentType(ContentType.JSON).extract().response();
}
@Test
public void maxUserId() {
Response response = getJsonPath(endpoint)
.then()
.assertThat()
.body();
}