@Test
public void testAllocateRequestWithoutRegistering() throws Exception {

  try {
    // Try to allocate an application master without registering.
    allocate(1);
    Assert
        .fail("The request to allocate application master should have failed");
  } catch (Throwable ex) {
    // This is expected. So nothing required here.
    LOG.info("AllocateRequest failed as expected because AM was not registered");
  }
}