@Test
public void should_respond_500_internal_error_when_error_on_deletion_page() throws Exception {

    doThrow(new RepositoryException("error occurs", new RuntimeException())).when(pageRepository).delete("my-page");
    mockMvc.perform(delete("/rest/pages/my-page")).andExpect(status().isInternalServerError());
}