dagId = new TezDAGID(appAttemptId.getApplicationId(), 1);
Assert.assertNotNull(dagId);
dagPlan = createTestDAGPlan();
dispatcher = new DrainDispatcher();
fsTokens = new Credentials();
jobTokenSecretManager = new JobTokenSecretManager();
appContext = mock(AppContext.class);
doReturn(appAttemptId).when(appContext).getApplicationAttemptId();
doReturn(dagId).when(appContext).getCurrentDAGID();
dag = new DAGImpl(dagId, conf, dagPlan,
dispatcher.getEventHandler(), taskAttemptListener,