@Test(expected = NotAllowedException.class)
public void should_not_allow_to_create_a_widget_with_an_already_existing_name() throws Exception {

    Widget widget = aWidget().name("existingName").id("customExistingName").build();
    addToRepository(widget);
    widgetRepository.create(aWidget().name("existingName").build());
}