RackResolver.init(new Configuration());
TaskSchedulerAppCallback appClient = mock(TaskSchedulerAppCallback.class);
TezAMRMClientAsync<CookieContainerRequest> amrmClient =
mock(TezAMRMClientAsync.class);
AppContext mockAppContext = mock(AppContext.class);
when(mockAppContext.getAMState()).thenReturn(DAGAppMasterState.RUNNING);
TaskSchedulerWithDrainableAppCallback taskScheduler =
new TaskSchedulerWithDrainableAppCallback(
appClient, new AlwaysMatchesContainerMatcher(), "host", 0, "",
amrmClient, mockAppContext);