@Test
public void testNoNextPendingAsk() {

  FSLeafQueue queue = Mockito.mock(FSLeafQueue.class);
  ApplicationAttemptId applicationAttemptId = createAppAttemptId(1, 1);
  RMContext rmContext = Mockito.mock(RMContext.class);
  ConcurrentMap<ApplicationId, RMApp> rmApps = new ConcurrentHashMap<>();
  RMApp rmApp = Mockito.mock(RMApp.class);
  rmApps.put(applicationAttemptId.getApplicationId(), rmApp);
  ApplicationSubmissionContext appContext =
      Mockito.mock(ApplicationSubmissionContext.class);
  Mockito.when(appContext.getUnmanagedAM()).thenReturn(false);
  Mockito.when(appContext.getLogAggregationContext())
      .thenReturn(Mockito.mock(LogAggregationContext.class));
  Mockito.when(rmApp.getApplicationSchedulingEnvs())
      .thenReturn(new HashMap<>());
  Mockito.when(rmApp.getApplicationSubmissionContext())
    .thenReturn(appContext);
  Mockito.when(rmContext.getRMApps()).thenReturn(rmApps);
  Mockito.when(rmContext.getYarnConfiguration()).thenReturn(conf);
  FSAppAttempt schedulerApp =
      new FSAppAttempt(scheduler, applicationAttemptId, "user1", queue,
          null, rmContext);
  schedulerApp.setAmRunning(false);
  FSSchedulerNode schedulerNode = Mockito.mock(FSSchedulerNode.class);
  Resource resource = schedulerApp.assignContainer(schedulerNode);
  assertEquals(Resources.none(), resource);
}