@Test
public void testSetGlobalValue() throws Exception {

    System.out.println("   setGlobalValue");
    final String varName = "foo";
    final String varValue = "a global value";
    EnvFunction.setGlobalValue(varName, varValue);
    class Task implements Runnable {
        public void run() {
            Object result = ff.function("env", ff.literal(varName)).evaluate(null);
            assertEquals(varValue, result.toString());
        }
    }
    Future f1 = executor.submit(new Task());
    Future f2 = executor.submit(new Task());
    // calling get on the Futures ensures that this test method
    // completes before another starts
    f1.get();
    f2.get();
}