List of usage examples for org.springframework.hateoas Links valueOf
@Deprecated public static Links valueOf(String source)
From source file:org.springframework.data.rest.webmvc.jpa.JpaWebTests.java
/** * @see DATAREST-658// w w w.j a v a 2s . c o m */ @Test public void returnsLinkHeadersForHeadRequestToItemResource() throws Exception { MockHttpServletResponse response = client.request(client.discoverUnique("people")); String personHref = JsonPath.read(response.getContentAsString(), "$._embedded.people[0]._links.self.href"); response = mvc.perform(head(personHref))// .andExpect(status().isNoContent())// .andReturn().getResponse(); Links links = Links.valueOf(response.getHeader("Link")); assertThat(links.hasLink("self"), is(true)); assertThat(links.hasLink("person"), is(true)); }