CucumberManager { public ScenarioGlobals startNewScenario() { ScenarioGlobals scenarioGlobals = new ScenarioGlobals(); scenarioGlobalsMap.put(Thread.currentThread(), scenarioGlobals); if(scenarioCreationHook != null) { scenarioCreationHook.scenarionStarted(scenarioGlobals); } return scenarioGlobals; } CucumberManager(
			String scenarioGlobalsCreationHookClass, 
			String defaultCucumberOptionsString,
			boolean openResultingReportAfterCompletion,
			int parallelFeatureThreads,
			int featureFileTimeout); ScenarioGlobals startNewScenario(); ScenarioGlobals getCurrentScenarioGlobals(); ScenarioGlobals stopNewScenario(); void cleanUp(); boolean isOpenResultingReportAfterCompletion(); void setOpenResultingReportAfterCompletion(boolean openResultingReportAfterCompletion); Thread getReportingShutdownHook(final String testResultFolder); int getParallelFeatureThreads(); int getFeatureFileTimeout();  }
@Test public void testStartNewScenario() throws SecurityException, IllegalArgumentException, NoSuchMethodException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException { CucumberManager manager = new CucumberManager("com.gfk.senbot.framework.context.MockScenarioCreationHook", null, false, 1, 3600); assertNull("No globals should be associated with the current thread when not yet started", manager.getCurrentScenarioGlobals()); ScenarioGlobals instantiatedScenario = manager.startNewScenario(); assertNotNull(instantiatedScenario); assertNotNull(instantiatedScenario.getAttribute(MockScenarioCreationHook.STARTED_ATTRIBUTE_KEY)); assertEquals(MockScenarioCreationHook.STARTED_ATTRIBUTE_VALUE, instantiatedScenario.getAttribute(MockScenarioCreationHook.STARTED_ATTRIBUTE_KEY)); assertEquals(instantiatedScenario, manager.getCurrentScenarioGlobals()); manager.startNewScenario(); assertNotSame(instantiatedScenario, manager.getCurrentScenarioGlobals()); manager.stopNewScenario(); }