ChangePassword implements IsWidget { public void show(final String username) { clear(); this.username = username; this.callback = null; view.show(UsersManagementWidgetsConstants.INSTANCE.changePasswordFor() + " " + username); } @Inject  ChangePassword(final ClientUserSystemManager userSystemManager,
                          final Event<NotificationEvent> workbenchNotification,
                          final Event<OnErrorEvent> errorEvent,
                          final Event<ChangePasswordEvent> changePasswordEvent,
                          final View view); @PostConstruct void init(); void show(final String username); void show(final String username,
                     final ChangePasswordCallback callback); void clear(); @Override Widget asWidget(); public View view; }
@Test public void testShow() throws Exception { presenter.show("user1"); assertEquals(presenter.username, "user1"); verify(view, times(1)).clear(); verify(view, times(1)).show(anyString()); }