### Question:
DeleteComponentDialog implements EventListener<Event> { @Override public void onEvent(Event event) { if ((Integer) event.getData() == Messagebox.YES) { deleteComponent(); } } DeleteComponentDialog(ComponentService componentService, ComponentList componentsToUpdate); void confirmDeletion(@Nonnull Component toDelete); @Override void onEvent(Event event);  }### Answer:
@Test public void successfulRemovalShouldDeleteFromComponentList() throws Exception { componentsToUpdate.add(null); sut.onEvent(positiveConfirm()); assertTrue(componentsToUpdate.getList().isEmpty()); }