### Question:
ExecutionScriptHandlerDispatcher implements ExecutionScriptHandler<T> { @Override public Map<String, String> getEnvironmentVariables( ExecutionContext context, ExecutionScript script) throws InterruptedException, IOException { ExecutionScriptHandler<T> target = resolve(context, script); return target.getEnvironmentVariables(context, script); } protected  ExecutionScriptHandlerDispatcher(Class<? extends ExecutionScriptHandler<T>> handlerKind); @Override void configure(ServiceProfile<?> profile); @Override String getHandlerId(); @Override String getResourceId(
            ExecutionContext context,
            ExecutionScript script); @Override Map<String, String> getProperties(
            ExecutionContext context,
            ExecutionScript script); @Override Map<String, String> getEnvironmentVariables(
            ExecutionContext context,
            ExecutionScript script); @Override void setUp(ExecutionMonitor monitor, ExecutionContext context); @Override void execute(
            ExecutionMonitor monitor,
            ExecutionContext context,
            T script); @Override void cleanUp(ExecutionMonitor monitor, ExecutionContext context);  }### Answer:
@Test public void getEnvironmentVariables() throws Exception { put("testing.*=other"); Map<String, String> conf = createConf(); declare(conf, "default", MockCommandScriptHandler.class); declare(conf, "other", MockCommandScriptHandler.class); CommandScriptHandlerDispatcher dispatcher = create(conf); ExecutionContext something = context("something"); assertThat(dispatcher.getEnvironmentVariables(something, null).get("value"), is("default")); ExecutionContext testing = context("testing"); assertThat(dispatcher.getEnvironmentVariables(testing, null).get("value"), is("other")); }