### Question:
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { protected void onDeleteAnnotation(final Annotation annotation) { String message = Constants.INSTANCE.advanced_domain_annotation_list_editor_message_confirm_annotation_deletion( annotation.getClassName(), (elementType != null ? elementType.name() : " object/field")); view.showYesNoDialog(message, getDeleteAnnotationCommand(annotation), getNoActionCommand(), getNoActionCommand()); } @Inject  AdvancedAnnotationListEditor(AdvancedAnnotationListEditorView view,
                                        Caller<DataModelerService> modelerService,
                                        Instance<ValuePairEditorPopup> valuePairEditorInstance,
                                        Instance<AnnotationListItem> itemInstance); @Override Widget asWidget(); void init(final KieModule module,
                     final ElementType elementType); void loadAnnotations(List<Annotation> annotations); void loadAnnotations(List<Annotation> annotations,
                                Map<String, AnnotationSource> annotationSources); boolean isReadonly(); void setReadonly(boolean readonly); @Override void onAddAnnotation(); void addDeleteAnnotationHandler(AdvancedAnnotationListEditorView.DeleteAnnotationHandler deleteAnnotationHandler); void addClearValuePairHandler(AdvancedAnnotationListEditorView.ClearValuePairHandler clearValuePairHandler); void addValuePairChangeHandler(AdvancedAnnotationListEditorView.ValuePairChangeHandler valuePairChangeHandler); void addAddAnnotationHandler(AdvancedAnnotationListEditorView.AddAnnotationHandler addAnnotationHandler); void clear(); void removeAnnotation(Annotation annotation);  }### Answer:
@Test public void testOnDeleteAnnotation() { annotationListEditor.init(kieModule, elementType); annotationListEditor.loadAnnotations(annotations, annotationSourcesMap); Annotation selectedAnnotation = annotations.get(2); annotationListEditor.onDeleteAnnotation(selectedAnnotation); String expectedMessage = Constants.INSTANCE.advanced_domain_annotation_list_editor_message_confirm_annotation_deletion( selectedAnnotation.getClassName(), elementType.name()); verify(view, times(1)).showYesNoDialog(eq(expectedMessage), yesCommandCaptor.capture(), noCommandCaptor.capture(), cancelCommandCaptor.capture()); yesCommandCaptor.getValue().execute(); verify(deleteAnnotationHandler, times(1)).onDeleteAnnotation(selectedAnnotation); }