@Test
public void testNewPipelineGetData() {

  MemoryUsage usage = new MemoryUsage(myProfilers);
  RangedContinuousSeries rangedSeries = usage.getTotalMemorySeries();
  Range range = rangedSeries.getXRange();
  // Request full range
  range.set(0, TimeUnit.SECONDS.toMicros(100));
  List<SeriesData<Long>> series = rangedSeries.getSeries();
  Truth.assertThat(series.size()).isEqualTo(10);
  for (int i = 0; i < series.size(); i++) {
    Truth.assertThat(series.get(i).value).isEqualTo(i * 10);
  }
  // Request negative to mid range
  range.set(TimeUnit.SECONDS.toMicros(-50), TimeUnit.SECONDS.toMicros(45));
  series = rangedSeries.getSeries();
  Truth.assertThat(series.size()).isEqualTo(6);
  for (int i = 0; i < series.size(); i++) {
    Truth.assertThat(series.get(i).value).isEqualTo(i * 10);
  }
  // Request mid to high range
  range.set(TimeUnit.SECONDS.toMicros(45), TimeUnit.SECONDS.toMicros(200));
  series = rangedSeries.getSeries();
  Truth.assertThat(series.size()).isEqualTo(6);
  for (int i = 0; i < series.size(); i++) {
    Truth.assertThat(series.get(i).value).isEqualTo((i + 4) * 10);
  }
}