@Override
    public void cleanupExpiredSegments(final long streamTime) {
        super.cleanupExpiredSegments(streamTime);
    }
@Test
    public void shouldCleanupSegmentsThatHaveExpired() {
        final LogicalKeyValueSegment segment1 = segments.getOrCreateSegmentIfLive(0, context, 0);
        final LogicalKeyValueSegment segment2 = segments.getOrCreateSegmentIfLive(2, context, SEGMENT_INTERVAL * 2L);
        final LogicalKeyValueSegment segment3 = segments.getOrCreateSegmentIfLive(3, context, SEGMENT_INTERVAL * 3L);
        final LogicalKeyValueSegment segment4 = segments.getOrCreateSegmentIfLive(7, context, SEGMENT_INTERVAL * 7L);

        segments.cleanupExpiredSegments(SEGMENT_INTERVAL * 7L);

        final List<LogicalKeyValueSegment> allSegments = segments.allSegments(true);
        assertEquals(2, allSegments.size());
        assertEquals(segment3, allSegments.get(0));
        assertEquals(segment4, allSegments.get(1));
    }