### Question:
POMWizardPage implements WizardPage { public POM getPom() { return pomEditor.getPom(); } POMWizardPage(); @Inject  POMWizardPage(final POMEditorPanel pomEditor,
                         final POMWizardPageView view,
                         final Event<WizardPageStatusChangeEvent> wizardPageStatusChangeEvent,
                         final Caller<ProjectScreenService> projectScreenService,
                         final Caller<ValidationService> validationService); void setPom(final POM pom); POM getPom(); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void initialise(); @Override void prepareView(); @Override Widget asWidget();  }### Answer:
@Test public void testNameChangeHandlersRegistered() { when( pomEditor.getPom() ).thenReturn( new POM( "name", "description","url", new GAV( "g", "a", "v" ) ) ); doNothing().when( pomEditor ).setArtifactID( anyString() ); verify( pomEditor, times( 1 ) ).addNameChangeHandler( nameChangeCaptor.capture() ); nameChangeCaptor.getValue().onChange( "any new value" ); verify( event ).fire( any( WizardPageStatusChangeEvent.class ) ); }
@Test public void testVersionChangeHandlersRegistered() { when( pomEditor.getPom() ).thenReturn( new POM( "name", "description", "url", new GAV( "g", "a", "v" ) ) ); verify( pomEditor, times( 1 ) ).addVersionChangeHandler( versionChangeCaptor.capture() ); versionChangeCaptor.getValue().onChange( "any new value" ); verify( event ).fire( any( WizardPageStatusChangeEvent.class ) ); }
@Test public void testGroupChangeHandlersRegistered() { when( pomEditor.getPom() ).thenReturn( new POM( "name", "description","url", new GAV( "g", "a", "v" ) ) ); verify( pomEditor, times( 1 ) ).addGroupIdChangeHandler( groupChangeCaptor.capture() ); groupChangeCaptor.getValue().onChange( "any new value" ); verify( event ).fire( any( WizardPageStatusChangeEvent.class ) ); }
@Test public void testArtifactChangeHandlersRegistered() { when( pomEditor.getPom() ).thenReturn( new POM( "name", "description","url", new GAV( "g", "a", "v" ) ) ); verify( pomEditor, times( 1 ) ).addArtifactIdChangeHandler( artifactChangeCaptor.capture() ); artifactChangeCaptor.getValue().onChange( "any new value" ); verify( event ).fire( any( WizardPageStatusChangeEvent.class ) ); }