### Question:
DriverDefPage implements WizardPage,
                   DriverDefPageView.Presenter { @Override public void isComplete(Callback<Boolean> callback) { boolean complete = editorHelper.isNameValid() && editorHelper.isDriverClassValid() && editorHelper.isGroupIdValid() && editorHelper.isArtifactIdValid() && editorHelper.isVersionValid(); callback.callback(complete); } @Inject  DriverDefPage(final DriverDefPageView view,
                         final DriverDefMainPanel mainPanel,
                         final DriverDefEditorHelper editorHelper,
                         final Event<WizardPageStatusChangeEvent> statusChangeEvent); void setDriverDef(DriverDef driverDef); @Override String getTitle(); @Override void isComplete(Callback<Boolean> callback); @Override void initialise(); @Override void prepareView(); @Override Widget asWidget(); void notifyChange(); void setComplete(boolean complete); void clear();  }### Answer:
@Test public void testValidCompletion() { completeValidDefPage(); verify( statusChangeEvent, times( 5 ) ).fire( any( WizardPageStatusChangeEvent.class ) ); assertEquals( NAME, driverDef.getName() ); assertEquals( GROUP_ID, driverDef.getGroupId() ); assertEquals( ARTIFACT_ID, driverDef.getArtifactId() ); assertEquals( VERSION, driverDef.getVersion() ); assertEquals( DRIVER_CLASS, driverDef.getDriverClass() ); defPage.isComplete( new Callback<Boolean>() { @Override public void callback( Boolean result ) { assertTrue( result ); } } ); }
@Test public void testInvalidCompletion() { editorHelper.setValid( true ); defPage.isComplete( new Callback<Boolean>() { @Override public void callback( Boolean result ) { assertTrue( result ); } } ); when( mainPanelView.getDriverClass() ).thenReturn( "SomeWrongClassName" ); editorHelper.onDriverClassChange(); defPage.isComplete( new Callback<Boolean>() { @Override public void callback( Boolean result ) { assertFalse( result ); } } ); }