UrlExecutionProcessorStrategy extends ProcessorStrategy { void prepareSuiteWrapper() throws StorageException { LOGGER.debug("Fetching suite patterns {}", getObjectToRun()); try { Suite mergedSuite = suiteDataService.enrichWithPatterns(objectToRunWrapper.getRealSuite()); objectToRunWrapper.setRealSuite(mergedSuite); Url url = (Url) objectToRunWrapper.getObjectToRun(); String urlName = url.getName(); String testName = objectToRunWrapper.getTestName(); objectToRunWrapper.setObjectToRun(mergedSuite.getTest(testName).get().getUrl(urlName).get()); runIndexWrapper = RunIndexWrapperFactory.createInstance(objectToRunWrapper); } catch (StorageException e) { e.printStackTrace(); } } UrlExecutionProcessorStrategy();   }
@Test public void prepareSuiteWrapper() throws StorageException { urlExecutionProcessorStrategy.prepareSuiteWrapper(); verify(suiteDataService, times(1)).enrichWithPatterns(any(Suite.class)); verify(objectToRunWrapper,times(1)).setObjectToRun(any(Object.class)); verify(objectToRunWrapper,times(1)).setRealSuite(any(Suite.class)); }