### Question:
XarExtensionScriptService extends AbstractExtensionScriptService { public Job diff(String feature, String wiki) { setError(null); String namespace = getWikiNamespace(wiki); InstallRequest installRequest = new InstallRequest(); installRequest.addExtension(new ExtensionId(feature, (Version) null)); if (namespace != null) { installRequest.addNamespace(namespace); } installRequest.setId(getDiffJobId(feature, namespace)); try { return this.jobExecutor.execute(DiffXarJob.JOB_TYPE, installRequest); } catch (Exception e) { setError(e); return null; } }  Job repairInstalledExtension(String id, String version, String wiki); List<String> getDiffJobId(String feature, String namespace); Job diff(String feature, String wiki); ConflictQuestion.ConflictType[] getConflictTypes(); boolean reset(DocumentReference reference, ExtensionId extensionId, List<String> jobId); boolean reset(DocumentReference reference, List<String> jobId); Collection<InstalledExtension> getInstalledExtensions(DocumentReference reference); Document getInstalledExtensionDocument(DocumentReference reference); Document getInstalledExtensionDocument(DocumentReference reference, ExtensionId extensionId); Document getInstalledExtensionDocument(DocumentReference reference, XarInstalledExtension extension); boolean isEditAllowed(DocumentReference documentReference); boolean isDeleteAllowed(DocumentReference documentReference); ProtectionLevel getEditSecurityLevel(DocumentReference userReference, DocumentReference documentReference); ProtectionLevel getDeleteSecurityLevel(DocumentReference userReference, DocumentReference documentReference); @Unstable Boolean isExtensionDocument(DocumentReference documentReference); @Unstable Boolean isCustomizedExtensionDocument(DocumentReference documentReference);  }### Answer:
@Test public void diff() throws JobException { when(this.authorization.hasAccess(Right.PROGRAM)).thenReturn(true); String wiki = "subwiki"; String feature = "fakefeature"; String wikiNamespace = "wiki:subwiki"; InstallRequest expectedInstallRequest = new InstallRequest(); List<String> jobId = ExtensionRequest.getJobId(ExtensionRequest.JOBID_ACTION_PREFIX, feature, wikiNamespace); expectedInstallRequest.setId(jobId); expectedInstallRequest.addExtension(new ExtensionId(feature, (Version) null)); expectedInstallRequest.addNamespace(wikiNamespace); this.xarExtensionScriptService.diff(feature, wiki); ArgumentCaptor<InstallRequest> installRequestArgumentCaptor = ArgumentCaptor.forClass(InstallRequest.class); verify(this.jobExecutor).execute(eq(DiffXarJob.JOB_TYPE), installRequestArgumentCaptor.capture()); InstallRequest installRequest = installRequestArgumentCaptor.getValue(); assertEquals(expectedInstallRequest.getId(), installRequest.getId()); assertEquals(expectedInstallRequest.getProperties(), installRequest.getProperties()); }