### Question:
OperationRunner implements Runnable { public void run() { try { logger.debug("OperationWrapper [" + operationWrapper.getOperation().getName() + "]"); if (executorContext.getJsonContext() == null) { logger.warn("Executor context is null"); } else { logger.debug("Executor Context [" + executorContext.getJsonContext().toString() + "], Executor ProgressReporter [" + executorContext.getAgendaProgressReporter() + "], Executor Reporter [" + executorContext.getReporter() + "]"); } logger.debug("Executing start of Pod"); BaseOperationExecutor executor = executorContext.getOperationExecutorFactory().generateOperationExecutor(executorContext, operationWrapper); executorContext.getAgendaProgressReporter().registerOperationProgressProvider(executor); String outputPayload = executor.execute(operationWrapper.getInputPayload()); OperationProgress operationProgress = executor.retrieveOperationProgress(); if(operationProgress == null) { setFailureOnOperationWrapper( operationWrapper, ExecutorMessages.OPERATION_EXECUTION_INCOMPLETE_NO_PROGRESS.getMessage(getOperationName(operationWrapper)), null); } else { if(operationProgress.getProcessingState() == ProcessingState.COMPLETE) { evaluateCompletedOperation(operationWrapper, operationProgress, outputPayload); } else { setFailureOnOperationWrapper( operationWrapper, ExecutorMessages.OPERATION_EXECUTION_INCOMPLETE.getMessage(getOperationName(operationWrapper), operationProgress.getProcessingState()), null); } } } catch(Throwable t) { setFailureOnOperationWrapper( operationWrapper, ExecutorMessages.OPERATION_EXECUTION_ERROR.getMessage(getOperationName(operationWrapper)), t); } if(onOperationCompleteListener != null) onOperationCompleteListener.onComplete(operationWrapper); } OperationRunner(OperationWrapper operationWrapper, ExecutorContext executorContext, OnOperationCompleteListener onOperationCompleteListener); void run(); OperationWrapper getOperationWrapper(); void setOperationCompleteEvent(OperationCompleteEvent operationCompleteEvent);  }### Answer:
@Test(dataProvider = "operationProgressProvider") public void testRunOperationProgressResult(OperationProgress operationProgress, final Boolean expectedSuccess) { doReturn(operationProgress).when(mockOperationExecutor).retrieveOperationProgress(); operationRunner.run(); verify(mockOperationExecutor, times(1)).execute(anyString()); if (expectedSuccess) { Assert.assertNull(operationWrapper.getDiagnosticEvents()); } else { Assert.assertNotNull(operationWrapper.getDiagnosticEvents()); Assert.assertEquals(operationWrapper.getDiagnosticEvents().size(), 1); } Assert.assertEquals(operationWrapper.getSuccess(), expectedSuccess); }