@Test
public void testGetById() throws Exception {

    final URIBuilder uriBuilder = createGetUrl(ROOT_URI + "/" + firstNode.getId());
    // performs GET: /api/cluster/nodes/1
    mockMvc.perform(get(toUrl(uriBuilder))
            .accept(MediaType.APPLICATION_JSON)
            .with(SecurityMockMvcRequestPostProcessors.authentication(mockAuthentication("ADMIN"))))
            .andExpect(status().isOk())
            .andExpect(jsonPath("id", equalTo(firstNode.getId().intValue())))
            .andExpect(jsonPath("code", is(firstNode.getCode())))
            .andExpect(jsonPath("name", is(firstNode.getName())))
            .andExpect(jsonPath("description").doesNotExist())
            .andExpect(jsonPath("state", is(firstNode.getState().name())));
}