XMLQueryCompiler compiler = new XMLQueryCompiler(null);
File tempFile = File.createTempFile(testCase.getXQueryFile().getName(), ".tmp");
tempFile.deleteOnExit();
Reader in = new InputStreamReader(new FileInputStream(testCase.getXQueryFile()), "UTF-8");
CompilerControlBlock ccb = new CompilerControlBlock(new StaticContextImpl(
RootStaticContextImpl.INSTANCE), new FileSplit[] { new FileSplit("nc1",
tempFile.getAbsolutePath()) });
compiler.compile(testCase.getXQueryDisplayName(), in, ccb, opts.optimizationLevel);
JobSpecification spec = compiler.getModule().getHyracksJobSpecification();
DynamicContext dCtx = new DynamicContextImpl(compiler.getModule().getModuleContext());