Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Test
fun getCatShouldReturnCatById() {
val allCatsResponse = restTemplate.getForEntity("/", CatsList::class.java)
val id = allCatsResponse.body[0].id
assertThat(id).isNotNull()
val getCatResponse = restTemplate.getForEntity("/$id", Cat::class.java)
assertThat(getCatResponse.body).isEqualToComparingOnlyGivenFields(fionaTheCat, "name", "age", "weight")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.