body("links[0].method", equalTo("GET")).
body("links[1].method", equalTo("GET")).
body("links[2].method", equalTo("GET")).
when().get("/api").asInputStream();
JsonPath jsonPath = JsonPath.from(rootResponse);
customersHref = jsonPath.<String, String>getMap("links.find {link -> link.rel == 'customers'}").get("href");
loansHref = jsonPath.<String, String>getMap("links.find {link -> link.rel == 'loans'}").get("href");
booksHref = jsonPath.<String, String>getMap("links.find {link -> link.rel == 'books'}").get("href");
searchHref = jsonPath.<String, String>getMap("links.find {link -> link.rel == 'search'}").get("href");
}