@Test(timeout = 10000)
public void testShutDownConnections()
    throws YarnException, IOException, InterruptedException {

  launchUAM(attemptId);
  registerApplicationMaster(
      RegisterApplicationMasterRequest.newInstance(null, 0, null), attemptId);
  uam.shutDownConnections();
  while (uam.isHeartbeatThreadAlive()) {
    LOG.info("waiting for heartbeat thread to finish");
    Thread.sleep(100);
  }
}