### Question:
IndexTreeInplaceAction extends UpdateTreeAction { @Override public void performAction(SolrUpdateRequest updateRequest) throws IndexingException { log.info("Starting inplace indexing of {}", updateRequest.getPid()); super.performAction(updateRequest); deleteStaleChildren(updateRequest); log.debug("Finished queueing inplace indexing of {}.", updateRequest.getPid().getRepositoryPath()); }  @Override void performAction(SolrUpdateRequest updateRequest); void deleteStaleChildren(SolrUpdateRequest updateRequest); void setIndexingMessageSender(IndexingMessageSender messageSender);  }### Answer:
@Test public void testIndexingWithCleanup() throws Exception { SolrUpdateRequest request = new SolrUpdateRequest(corpus.pid2.getRepositoryPath(), RECURSIVE_ADD, "1", USER); action.performAction(request); verify(messageSender, times(3)).sendIndexingOperation(eq(USER), pidCaptor.capture(), eq(IndexingActionType.ADD)); verify(messageSender).sendIndexingOperation(eq(USER), pidCaptor.capture(), eq(IndexingActionType.DELETE_CHILDREN_PRIOR_TO_TIMESTAMP)); }