@Test
public void should_respond_404_not_found_if_page_is_not_existing_when_renaming() throws Exception {

    when(pageService.get("my-page")).thenThrow(new NotFoundException("page not found"));
    mockMvc
            .perform(put("/rest/pages/my-page/name").contentType(MediaType.APPLICATION_JSON_VALUE).content(convertObjectToJsonBytes("hello")))
            .andExpect(status().isNotFound());
}