@Test
public void testTwoIdenticalRegisterRequest() throws Exception {

  // Register the application twice
  RegisterApplicationMasterRequest registerReq =
      Records.newRecord(RegisterApplicationMasterRequest.class);
  registerReq.setHost(Integer.toString(testAppId));
  registerReq.setRpcPort(0);
  registerReq.setTrackingUrl("");
  for (int i = 0; i < 2; i++) {
    RegisterApplicationMasterResponse registerResponse =
        interceptor.registerApplicationMaster(registerReq);
    Assert.assertNotNull(registerResponse);
    lastResponseId = 0;
  }
}