@Test
public void should_not_save_an_external_asset_for_internal_widget() throws Exception {

    Widget widget = aWidget().id("pb-widget").build();
    Asset asset = anAsset().build();
    when(widgetRepository.get("pb-widget")).thenReturn(widget);
    mockMvc.perform(
            post("/rest/widgets/pb-widget/assets")
                    .contentType(MediaType.APPLICATION_JSON_VALUE)
                    .content(convertObjectToJsonBytes(asset)))
            .andExpect(status().isForbidden());
}