SuiteExecutionProcessorStrategy extends ProcessorStrategy { void save() { LOGGER.debug("Persisting suite {}", getObjectToRun()); try { suiteDataService.saveSuite(objectToRunWrapper.getRealSuite()); } catch (ValidatorException | StorageException e) { LOGGER.error("Failed to save suite {}", objectToRunWrapper.getRealSuite(), e); } messagesSender.sendMessage( new FinishedSuiteProcessingMessage(FinishedSuiteProcessingMessage.Status.OK, objectToRunWrapper.getCorrelationId())); } SuiteExecutionProcessorStrategy();   }
@Test public void save_checkIfMethodCallsCorrectFunctions() throws ValidatorException, StorageException, JMSException { suiteExecutionProcessorStrategy.init(); suiteExecutionProcessorStrategy.save(); verify(suiteDataService, times(1)).saveSuite(any(Suite.class)); }