SavePopUpPresenter { public void show(final ParameterizedCommand<String> command) { this.command = command; view.show(); } @Inject  SavePopUpPresenter(View view,
                              Event<SaveInProgressEvent> saveInProgressEvent); @PostConstruct void setup(); void show(final ParameterizedCommand<String> command); void show(final Path path,
                     final ParameterizedCommand<String> command); ParameterizedCommand<String> getCommand(); void save(); void cancel();  }
@Test public void testShowWithAPathThatIsVersioned() throws Exception { final Path versionedPath = getVersionedPath(); presenter.show(versionedPath, command); verify(view).show(); verifyNoMoreInteractions(saveInProgressEvent); }
@Test public void testShowWithAPathThatIsNotVersioned() throws Exception { presenter.show(path, command); verifyNoMoreInteractions(view); verify(command).execute(""); verify(saveInProgressEvent).fire(new SaveInProgressEvent(any(Path.class))); }