@Test
public void should_respond_404_not_found_if_custom_widget_is_not_existing_when_renaming() throws Exception {

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