### Question:
CreateAnnotationWizard extends AbstractWizard { @Override public void complete() { doComplete(); super.complete(); } @Inject  CreateAnnotationWizard(SearchAnnotationPage searchAnnotationPage,
                                  SyncBeanManager iocManager); void init(KieModule module, ElementType target); @Override List<WizardPage> getPages(); @Override Widget getPageWidget(int pageNumber); @Override String getTitle(); @Override int getPreferredHeight(); @Override int getPreferredWidth(); @Override void isComplete(final Callback<Boolean> callback); void onCloseCallback(final Callback<Annotation> callback); @Override void complete(); @Override void close();  }### Answer:
@Test public void testAnnotationCreated() { AnnotationDefinitionRequest request = new AnnotationDefinitionRequest(Entity.class.getName()); AnnotationDefinitionResponse response = new AnnotationDefinitionResponse( DriverUtils.buildAnnotationDefinition(Entity.class)); when(searchView.getClassName()).thenReturn(Entity.class.getName()); when(modelerService.resolveDefinitionRequest(request, kieModule)).thenReturn(response); AnnotationValuePairDefinition valuePairDefinition = response.getAnnotationDefinition().getValuePair("name"); when(valuePairEditorProvider.getValuePairEditor(valuePairDefinition)).thenReturn(valuePairEditor); when(iocManager.lookupBean(ValuePairEditorPage.class)).thenReturn(beanDef); when(beanDef.getInstance()).thenReturn(editorPage); searchPage.onSearchClass(); WizardTestUtil.assertPageComplete(true, searchPage); when(editorView.getValuePairEditor()).thenReturn(valuePairEditor); when(valuePairEditor.getValue()).thenReturn("TheEntityName"); when(valuePairEditor.isValid()).thenReturn(true); editorPage.onValueChange(); WizardTestUtil.assertPageComplete(true, searchPage); createAnnotationWizard.complete(); Annotation expectedAnnotation = new AnnotationImpl(DriverUtils.buildAnnotationDefinition(Entity.class)); expectedAnnotation.setValue("name", "TheEntityName"); assertEquals(expectedAnnotation, createdAnnotation); }