### Question:
SolrIndexScriptService implements ScriptService { public void delete(EntityReference reference) { clearException(); try { checkAccessToWikiIndex(reference); this.solrIndexer.delete(reference, true); } catch (Exception e) { error(e); } }  void index(EntityReference reference); void index(List<EntityReference> references); void delete(EntityReference reference); void delete(List<EntityReference> references); int getQueueSize(); DocumentReference resolveDocument(SolrDocument document, Object... parameters); EntityReference resolve(SolrDocument document, Object... parameters); EntityReference resolve(SolrDocument document, EntityType type, Object... parameters); static final String CONTEXT_LASTEXCEPTION; }### Answer:
@Test public void deleteSingleReferenceChecksRights() throws Exception { EntityReference wikiReference = new WikiReference("someWiki"); this.service.delete(wikiReference); verify(this.mockAuthorization).checkAccess(Right.ADMIN, this.userReference, wikiReference); verify(this.mockAuthorization).checkAccess(Right.PROGRAM, this.contentAuthorReference, null); }
@Test public void deleteMultipleReferencesChecksRights() throws Exception { EntityReference wikiReference = new WikiReference("someWiki"); this.service.delete(Arrays.asList(wikiReference)); verify(this.mockAuthorization).checkAccess(Right.ADMIN, this.userReference, wikiReference); verify(this.mockAuthorization).checkAccess(Right.PROGRAM, this.contentAuthorReference, null); }