PGETaskInstance implements WorkflowTaskInstance { protected void createExeDir() throws PGEException { logger.info("Creating PGE execution working directory: [{}]", pgeConfig.getExeDir()); File executionDir = new File(pgeConfig.getExeDir()); if (!(executionDir.exists() || executionDir.mkdirs())) { logger.warn("Unable to create execution working directory: {}", pgeConfig.getExeDir()); throw new PGEException("mkdirs returned false for creating [" + pgeConfig.getExeDir() + "]"); } } protected  PGETaskInstance(); @Override void run(Metadata metadata, WorkflowTaskConfiguration config); String getWorkflowInstId(); void setWorkflowInstId(String workflowInstId); void setWmClient(WorkflowManagerClient wmClient); @Override void finalize();  }
@Test public void testCreateExeDir() throws Exception { PGETaskInstance pgeTask = createTestInstance(); File exeDir = new File(pgeTask.pgeConfig.getExeDir()); FileUtils.deleteDirectory(exeDir); assertFalse(exeDir.exists()); pgeTask.createExeDir(); assertTrue(exeDir.exists()); }