RestorePopUpPresenter { public void restore() { command.execute(view.getComment()); view.hide(); } @Inject  RestorePopUpPresenter(View view,
                                 BusyIndicatorView busyIndicatorView,
                                 Caller<VersionService> versionService,
                                 Event<RestoreEvent> restoreEvent,
                                 RestoreUtil restoreUtil); @PostConstruct void setup(); void restore(); void show(final ObservablePath currentPath,
                     final String currentVersionRecordUri,
                     final String branchName); void cancel(); ParameterizedCommand<String> restoreCommand(final ObservablePath currentPath,
                                                       final String currentVersionRecordUri,
                                                       final String branchName);  }
@Test public void testRestore() throws Exception { when(view.getComment()).thenReturn("test"); presenter.command = commandMock; presenter.restore(); verify(commandMock).execute("test"); verify(view).hide(); }