GAVEditorViewImpl extends Composite implements GAVEditorView { @UiHandler("groupIdTextBox") public void onGroupIdChange(final KeyUpEvent event) { presenter.onGroupIdChange(groupIdTextBox.getText()); } GAVEditorViewImpl(); @Override void setPresenter(final Presenter presenter); @Override void setGroupId(final String id); @Override void setArtifactId(final String id); @Override void setVersion(final String version); @Override void disableGroupID(final String reason); @Override void disableArtifactID(final String reason); @Override void disableVersion(final String reason); @Override void setReadOnly(); @Override void enableGroupID(); @Override void enableArtifactID(); @Override void enableVersion(); @Override void setValidGroupID(final boolean isValid); @Override void setValidArtifactID(final boolean isValid); @Override void setValidVersion(final boolean isValid); @UiHandler("groupIdTextBox") //Use KeyUpEvent as ValueChangeEvent is only fired when the focus is lost void onGroupIdChange(final KeyUpEvent event); @UiHandler("artifactIdTextBox") //Use KeyUpEvent as ValueChangeEvent is only fired when the focus is lost void onArtifactIdChange(final KeyUpEvent event); @UiHandler("versionTextBox") //Use KeyUpEvent as ValueChangeEvent is only fired when the focus is lost void onVersionChange(final KeyUpEvent event);  }
@Test public void testGroupChange() { when(textBoxGroup.getText()).thenReturn("group"); view.onGroupIdChange(event); verify(presenter, times(1)).onGroupIdChange("group"); }