@Test
public void traceIdPassedInConstructor() {

  int traceId1 = 20;
  CpuThreadInfo info = new CpuThreadInfo(10, "main");
  Range range = new Range(0, 30);
  Map<CpuThreadInfo, CaptureNode> captureTrees =
    new ImmutableMap.Builder<CpuThreadInfo, CaptureNode>().put(info, new CaptureNode(new StubCaptureNodeModel())).build();
  TraceParser parser = new FakeTraceParser(range, captureTrees, false);
  CpuCapture capture = new CpuCapture(parser, traceId1, Cpu.CpuTraceType.UNSPECIFIED_TYPE);
  assertThat(capture.getTraceId()).isEqualTo(traceId1);
  int traceId2 = 50;
  capture = new CpuCapture(parser, traceId2, Cpu.CpuTraceType.UNSPECIFIED_TYPE);
  assertThat(capture.getTraceId()).isEqualTo(traceId2);
}