### Question:
UpdateTreeAction extends AbstractIndexingAction { @Override public void performAction(SolrUpdateRequest updateRequest) throws IndexingException { log.debug("Queuing update tree of {}", updateRequest.getPid()); index(updateRequest); log.debug("Finished queuing update of tree for {}.", updateRequest.getPid()); }  @Override void performAction(SolrUpdateRequest updateRequest); void setRepositoryObjectLoader(RepositoryObjectLoader repositoryObjectLoader); void setTreeIndexer(RecursiveTreeIndexer treeIndexer); void setActionType(String actionName);  }### Answer:
@Test public void testVerifyQueued() throws Exception { action.performAction(new SolrUpdateRequest(corpus.pid2.getRepositoryPath(), RECURSIVE_ADD, "1", USER)); verify(messageSender, times(3)).sendIndexingOperation(eq(USER), pidCaptor.capture(), eq(IndexingActionType.ADD)); List<PID> pids = pidCaptor.getAllValues(); assertTrue(pids.contains(corpus.pid2)); assertTrue(pids.contains(corpus.pid4)); assertTrue(pids.contains(corpus.pid6)); }
@Test public void testNoDescendents() throws Exception { ContentObject obj6 = mock(ContentObject.class); when(obj6.getPid()).thenReturn(corpus.pid6); Model model = ModelFactory.createDefaultModel(); when(obj6.getResource()).thenReturn(model.getResource(corpus.pid6.getRepositoryPath())); when(repositoryObjectLoader.getRepositoryObject(eq(corpus.pid6))).thenReturn(obj6); action.performAction(new SolrUpdateRequest(corpus.pid6.getRepositoryPath(), IndexingActionType.RECURSIVE_ADD)); verify(messageSender).sendIndexingOperation(eq(null), pidCaptor.capture(), eq(IndexingActionType.ADD)); List<PID> pids = pidCaptor.getAllValues(); assertTrue(pids.contains(corpus.pid6)); }