SaveAndRenameCommandBuilder { void notifyRenameInProgress() { renameInProgressEvent.fire(makeRenameInProgressEvent()); } @Inject  SaveAndRenameCommandBuilder(final RenamePopUpPresenter renamePopUpPresenter,
                                       final BusyIndicatorView busyIndicatorView,
                                       final Event<NotificationEvent> notification,
                                       final Event<RenameInProgressEvent> renameInProgressEvent); SaveAndRenameCommandBuilder<T, M> addValidator(final Validator validator); SaveAndRenameCommandBuilder<T, M> addValidator(final Supplier<Boolean> validator); SaveAndRenameCommandBuilder<T, M> addRenameService(final Caller<? extends SupportsSaveAndRename<T, M>> renameCaller); SaveAndRenameCommandBuilder<T, M> addPathSupplier(final Supplier<Path> pathSupplier); SaveAndRenameCommandBuilder<T, M> addMetadataSupplier(final Supplier<M> metadataSupplier); SaveAndRenameCommandBuilder<T, M> addContentSupplier(final Supplier<T> contentSupplier); SaveAndRenameCommandBuilder<T, M> addIsDirtySupplier(final Supplier<Boolean> isDirtySupplier); SaveAndRenameCommandBuilder<T, M> addSuccessCallback(final ParameterizedCommand<Path> onSuccess); SaveAndRenameCommandBuilder<T, M> addErrorCallback(final Command onError); SaveAndRenameCommandBuilder<T, M> addBeforeSaveAndRenameCommand(final Command beforeSaveAndRenameCommand); Command build();  }
@Test public void testNotifyRenameInProgress() { final RenameInProgressEvent event = mock(RenameInProgressEvent.class); doReturn(event).when(builder).makeRenameInProgressEvent(); builder.notifyRenameInProgress(); verify(renameInProgressEvent).fire(event); }