@Test
public void testStartCapturing() throws InterruptedException, IOException {

  assertThat(myStage.getCaptureState()).isEqualTo(CpuProfilerStage.CaptureState.IDLE);
  // Start a successful capture
  CpuProfilerTestUtils.startCapturing(myStage, myCpuService, myTransportService, true);
  CpuProfilerTestUtils.stopCapturing(myStage, myCpuService, myTransportService, true, CpuProfilerTestUtils.readValidTrace());
  // Start a failing capture
  CpuProfilerTestUtils.startCapturing(myStage, myCpuService, myTransportService, false);
}