@VisibleForTesting
  boolean isThreadDumpCaptured() {
    return isThreadDumpCaptured;
  }
@Test(timeout=60000)
  public void testThreadDumpCaptureAfterNNStateChange() throws Exception {
    startCluster();
    MockNameNodeResourceChecker mockResourceChecker =
        new MockNameNodeResourceChecker(conf);
    mockResourceChecker.setResourcesAvailable(false);
    cluster.getNameNode(0).getNamesystem()
        .setNNResourceChecker(mockResourceChecker);
    waitForHAState(0, HAServiceState.STANDBY);
    while (!thr1.zkfc.isThreadDumpCaptured()) {
      Thread.sleep(1000);
    }
  }