### Question:
RefactoringScriptService implements ScriptService { public Job rename(MoveRequest request) { return execute(RefactoringJobs.RENAME, request); }  RequestFactory getRequestFactory(); Job move(MoveRequest request); Job move(Collection<EntityReference> sources, EntityReference destination); Job move(EntityReference source, EntityReference destination); Job rename(MoveRequest request); Job rename(EntityReference oldReference, EntityReference newReference); Job rename(EntityReference reference, String newName); Job convertToNestedDocument(DocumentReference documentReference); Job convertToTerminalDocument(DocumentReference documentReference); Job copy(CopyRequest request); Job copy(Collection<EntityReference> sources, EntityReference destination); Job copy(EntityReference source, EntityReference destination); Job copyAs(CopyRequest request); Job copyAs(EntityReference sourceReference, EntityReference copyReference); Job copyAs(EntityReference reference, String copyName); Job delete(EntityRequest request); Job delete(Collection<EntityReference> entityReferences); Job delete(EntityReference entityReference); Job create(CreateRequest request); Job create(Collection<EntityReference> entityReferences); Job create(EntityReference entityReference); Exception getLastError(); Job restore(RestoreRequest restoreRequest); Job restore(String batchId); Job restore(List<Long> deletedDocumentIds); Job permanentlyDelete(PermanentlyDeleteRequest request); Job permanentlyDelete(String batchId); Job permanentlyDelete(List<Long> deletedDocumentIds); @Unstable Job changeDocumentAuthor(DocumentReference oldAuthorReference, DocumentReference newAuthorReference); @Unstable Job replaceUser(ReplaceUserRequest request); @Unstable boolean isRecycleBinSkippingAllowed();  }### Answer:
@Test void rename() throws Exception { SpaceReference spaceReference = new SpaceReference("Alice", new SpaceReference("Users", new WikiReference("dev"))); String newName = "Bob"; MoveRequest moveRequest = new MoveRequest(); this.fillCopyOrMoveRequest(moveRequest); when(this.requestFactory.createRenameRequest(spaceReference, newName)).thenReturn(moveRequest); this.refactoringScriptService.rename(spaceReference, newName); verify(this.requestFactory).createRenameRequest(spaceReference, newName); verify(this.jobExecutor).execute(RefactoringJobs.RENAME, moveRequest); }