### Question:
ScriptContextImplementation implements InternalScriptContext { public Barrier barrier(String name) throws CommunicationException { return new BarrierImplementation(m_barrierGroups.getGroup(name), m_barrierIdentityFactory); } ScriptContextImplementation(
     WorkerIdentity workerIdentity,
     WorkerIdentity firstWorkerIdentity,
     ThreadContextLocator threadContextLocator,
     GrinderProperties properties,
     Logger logger,
     Sleeper sleeper,
     SSLControl sslControl,
     Statistics scriptStatistics,
     TestRegistry testRegistry,
     ThreadStarter threadStarter,
     ThreadStopper threadStopper,
     BarrierGroups barrierGroups,
     BarrierIdentity.Factory barrierIdentityFactory); int getAgentNumber(); String getProcessName(); int getProcessNumber(); int getFirstProcessNumber(); int getThreadNumber(); int getRunNumber(); Logger getLogger(); void sleep(long meanTime); void sleep(long meanTime, long sigma); int startWorkerThread(); int startWorkerThread(Object testRunner); void stopThisWorkerThread(); boolean stopWorkerThread(int threadNumber); GrinderProperties getProperties(); Statistics getStatistics(); SSLControl getSSLControl(); TestRegistry getTestRegistry(); Barrier barrier(String name);  }### Answer:
@Test public void testBarrier() throws Exception { final ScriptContextImplementation scriptContext = new ScriptContextImplementation( null, null, null, null, null, null, null, null, null, null, null, m_barrierGroups, m_identityGenerator); final Barrier globalBarrier = scriptContext.barrier("MyBarrierGroup"); assertEquals("MyBarrierGroup", globalBarrier.getName()); verify(m_identityGenerator).next(); }