ChangePassword implements IsWidget { public void clear() { username = null; callback = null; view.clear(); } @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 testClear() throws Exception { presenter.clear(); verify(view, times(1)).clear(); verify(view, times(0)).show(anyString()); verify(view, times(0)).hide(); assertNull(presenter.username); assertNull(presenter.callback); }