}
@Test(timeout=4000)
public void testConcurrentAppSubmit()
throws IOException, InterruptedException, BrokenBarrierException {
YarnScheduler yarnScheduler = mock(YarnScheduler.class);
RMContext rmContext = mock(RMContext.class);
ApplicationsStore stateStore = mock(ApplicationsStore.class);
when(rmContext.getApplicationsStore()).thenReturn(stateStore);
mockRMContext(yarnScheduler, rmContext);
RMAppManager appManager = new RMAppManager(rmContext, yarnScheduler,