@Test (timeout = 50000)
public void testGetNextHeartBeatInterval() throws Exception {

  Configuration conf = new Configuration();
  conf.set(YarnConfiguration.RM_NM_HEARTBEAT_INTERVAL_MS, "4000");
  rm = new MockRM(conf);
  rm.start();
  MockNM nm1 = rm.registerNode("host1:1234", 5120);
  MockNM nm2 = rm.registerNode("host2:5678", 10240);
  NodeHeartbeatResponse nodeHeartbeat = nm1.nodeHeartbeat(true);
  Assert.assertEquals(4000, nodeHeartbeat.getNextHeartBeatInterval());
  NodeHeartbeatResponse nodeHeartbeat2 = nm2.nodeHeartbeat(true);
  Assert.assertEquals(4000, nodeHeartbeat2.getNextHeartBeatInterval());
}