SaveAndRenameCommandBuilder { RenameInProgressEvent makeRenameInProgressEvent() { return new RenameInProgressEvent(getPath()); } @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 testMakeRenameInProgressEvent() { final Path path = mock(Path.class); doReturn(path).when(builder).getPath(); final RenameInProgressEvent event = builder.makeRenameInProgressEvent(); assertEquals(path, event.getPath()); }