@Test
public void testTransformSingleSampleData() {

  MemoryData memoryData = MemoryData.newBuilder()
    .setEndTimestamp(TimeUnit.MICROSECONDS.toNanos(222))
    .addMemSamples(MemoryData.MemorySample.newBuilder()
      .setTimestamp(TimeUnit.MICROSECONDS.toNanos(222))
      .setMemoryUsage(Memory.MemoryUsageData.newBuilder()
                     .setJavaMem(222).setTotalMem(222)))
    .build();
  myService.setMemoryData(memoryData);
  MemoryDataSeries series =
    new MemoryDataSeries(new ProfilerClient(myGrpcChannel.getName()).getMemoryClient(), ProfilersTestData.SESSION_DATA, data -> 111L);
  List<SeriesData<Long>> seriesDataList = series.getDataForRange(new Range(0, Double.MAX_VALUE));
  assertEquals(1, seriesDataList.size());
  assertEquals(222, seriesDataList.get(0).x);
  assertEquals(111, seriesDataList.get(0).value.longValue());
}