@Test
public void importTraceModeOnlyEnabledWhenImportedTraceProvided() {

  StudioProfilers profilers = myStage.getStudioProfilers();
  File traceFile = CpuProfilerTestUtils.getTraceFile("valid_trace.trace");
  CpuProfilerStage stage = new CpuProfilerStage(profilers, traceFile);
  // Passing a non-null file to the constructor will set the stage to inspect trace mode.
  assertThat(stage.isImportTraceMode()).isTrue();
  stage = new CpuProfilerStage(profilers, null);
  // Similarly, passing null to the constructor will set the stage to normal mode.
  assertThat(stage.isImportTraceMode()).isFalse();
  stage = new CpuProfilerStage(profilers);
  // Not specifying whether the stage is initiated in inspect trace mode is the same as initializing it in normal mode.
  assertThat(stage.isImportTraceMode()).isFalse();
}