@Test
public void getServiceDocument() throws Exception {

    String result = mvc.perform(
            MockMvcRequestBuilders.get("/")
            .accept("application/hal+json;charset=UTF-8")
    ).andDo(print())
            .andExpect(content()
                    .contentTypeCompatibleWith("application/hal+json;charset=UTF-8"))
            .andReturn().getResponse().getContentAsString();
    Resource<String> value = mapper.readValue(result, new TypeReference<Resource<String>>() {
    });
    List<String> linkRels = value.getLinks().stream().map(link -> link.getRel()).collect(Collectors.toList());
    assertThat(linkRels, Matchers.hasItem("self"));
    assertEquals(value.getLink("self"), value.getId());
    assertTrue(value.hasLink("bookmarks"));
}