public List<Long> allWindows() {
    return getWindowList(_oldestWindowIndex, _currentWindowIndex);
  }
@Test
  public void testAllWindows() {
    MetricSampleAggregator<String, IntegerEntity> aggregator =
        new MetricSampleAggregator<>(NUM_WINDOWS, WINDOW_MS, MIN_SAMPLES_PER_WINDOW,
                                     0, _metricDef);
    assertTrue(aggregator.allWindows().isEmpty());
    CruiseControlUnitTestUtils.populateSampleAggregator(NUM_WINDOWS + 1, MIN_SAMPLES_PER_WINDOW,
                                                        aggregator, ENTITY1, 0, WINDOW_MS,
                                                        _metricDef);
    List<Long> allStWindows = aggregator.allWindows();
    assertEquals(NUM_WINDOWS + 1, allStWindows.size());
    for (int i = 0; i < NUM_WINDOWS + 1; i++) {
      assertEquals((i + 1) * WINDOW_MS, allStWindows.get(i).longValue());
    }
  }