@Test
public void getConnectionsModel() {

  String dummyPayloadContent = "Dummy Contents";
  myTransportService.addFile(TEST_PAYLOAD_ID, ByteString.copyFromUtf8(dummyPayloadContent));
  NetworkConnectionsModel connectionsModel = myStage.getConnectionsModel();
  List<HttpData> dataList = connectionsModel.getData(new Range(TimeUnit.SECONDS.toMicros(0), TimeUnit.SECONDS.toMicros(16)));
  assertThat(dataList).hasSize(1);
  HttpData data = dataList.get(0);
  HttpData expectedData = FAKE_HTTP_DATA.get(0);
  assertThat(data.getRequestStartTimeUs()).isEqualTo(expectedData.getRequestStartTimeUs());
  assertThat(data.getRequestCompleteTimeUs()).isEqualTo(expectedData.getRequestCompleteTimeUs());
  assertThat(data.getResponseStartTimeUs()).isEqualTo(expectedData.getResponseStartTimeUs());
  assertThat(data.getResponseCompleteTimeUs()).isEqualTo(expectedData.getResponseCompleteTimeUs());
  assertThat(data.getConnectionEndTimeUs()).isEqualTo(expectedData.getConnectionEndTimeUs());
  assertThat(data.getMethod()).isEqualTo(expectedData.getMethod());
  assertThat(data.getUrl()).isEqualTo(expectedData.getUrl());
  assertThat(data.getTrace()).isEqualTo(expectedData.getTrace());
  assertThat(data.getRequestPayloadId()).isEqualTo(expectedData.getRequestPayloadId());
  assertThat(data.getResponsePayloadId()).isEqualTo(expectedData.getResponsePayloadId());
  assertThat(data.getResponseHeader().getField("connId")).isEqualTo(expectedData.getResponseHeader().getField("connId"));
  assertThat(Payload.newRequestPayload(connectionsModel, data).getBytes())
    .isEqualTo(Payload.newRequestPayload(connectionsModel, data).getBytes());
  assertThat(Payload.newResponsePayload(connectionsModel, data).getBytes())
    .isEqualTo(Payload.newResponsePayload(connectionsModel, data).getBytes());
}