@Test
public void testSubmitApplication()
    throws YarnException, IOException, InterruptedException {

  ApplicationId appId =
      ApplicationId.newInstance(System.currentTimeMillis(), 1);
  ApplicationSubmissionContextInfo context =
      new ApplicationSubmissionContextInfo();
  context.setApplicationId(appId.toString());
  Response response = interceptor.submitApplication(context, null);
  Assert.assertEquals(ACCEPTED, response.getStatus());
  SubClusterId ci = (SubClusterId) response.getEntity();
  Assert.assertNotNull(response);
  SubClusterId scIdResult = stateStoreUtil.queryApplicationHomeSC(appId);
  Assert.assertNotNull(scIdResult);
  Assert.assertTrue(subClusters.contains(scIdResult));
  Assert.assertEquals(ci, scIdResult);
}