@Test
public void testRequestHeapDump() {

  // Bypass the load mechanism in HeapDumpCaptureObject.
  myMockLoader.setReturnImmediateFuture(true);
  // Test the no-action cases
  MemoryProfilerTestUtils.heapDumpHelper(myStage, myUnifiedPipeline, myTransportService, myService, -1, -1,
                                         Memory.HeapDumpStatus.Status.FAILURE_UNKNOWN);
  assertThat(myStage.getSelectedCapture()).isNull();
  assertThat(myStage.getProfilerMode()).isEqualTo(ProfilerMode.NORMAL);
  MemoryProfilerTestUtils.heapDumpHelper(myStage, myUnifiedPipeline, myTransportService, myService, -1, -1,
                                         Memory.HeapDumpStatus.Status.IN_PROGRESS);
  assertThat(myStage.getSelectedCapture()).isNull();
  assertThat(myStage.getProfilerMode()).isEqualTo(ProfilerMode.NORMAL);
  MemoryProfilerTestUtils.heapDumpHelper(myStage, myUnifiedPipeline, myTransportService, myService, -1, -1,
                                         Memory.HeapDumpStatus.Status.UNSPECIFIED);
  assertThat(myStage.getSelectedCapture()).isNull();
  assertThat(myStage.getProfilerMode()).isEqualTo(ProfilerMode.NORMAL);
  // TODO need to add a mock heap dump here to test the success path
}