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

  LOG.info(
      "Test FederationClientInterceptor: Submit Application - Empty");
  try {
    interceptor.submitApplication(null);
    Assert.fail();
  } catch (YarnException e) {
    Assert.assertTrue(
        e.getMessage().startsWith("Missing submitApplication request or "
            + "applicationSubmissionContex information."));
  }
  try {
    interceptor.submitApplication(SubmitApplicationRequest.newInstance(null));
    Assert.fail();
  } catch (YarnException e) {
    Assert.assertTrue(
        e.getMessage().startsWith("Missing submitApplication request or "
            + "applicationSubmissionContex information."));
  }
  try {
    ApplicationSubmissionContext context = ApplicationSubmissionContext
        .newInstance(null, "", "", null, null, false, false, -1, null, null);
    SubmitApplicationRequest request =
        SubmitApplicationRequest.newInstance(context);
    interceptor.submitApplication(request);
    Assert.fail();
  } catch (YarnException e) {
    Assert.assertTrue(
        e.getMessage().startsWith("Missing submitApplication request or "
            + "applicationSubmissionContex information."));
  }
}