@Test
public void should_respond_404_not_found_if_page_is_not_existing() throws Exception {

    when(pageService.get("my-page")).thenThrow(new NotFoundException("page not found"));
    mockMvc.perform(get("/rest/pages/my-page")).andExpect(status().isNotFound());
}