### Question:
ChunkImpl implements Chunk { @Override public boolean containsDataInTimeRange(long startTs, long endTs) { return (chunkInfo.startTimeSecs <= startTs && chunkInfo.endTimeSecs >= startTs) || (chunkInfo.startTimeSecs <= endTs && chunkInfo.endTimeSecs >= endTs) || (chunkInfo.startTimeSecs >= startTs && chunkInfo.endTimeSecs <= endTs); } ChunkImpl(MetricAndTagStore store, ChunkInfo chunkInfo); @Override List<TimeSeries> query(Query query); @Override void addPoint(Metric metric, long ts, double value); @Override ChunkInfo info(); @Override boolean isReadOnly(); @Override boolean containsDataInTimeRange(long startTs, long endTs); @Override Map<String, Object> getStats(); @Override void close(); @Override void setReadOnly(boolean readOnly); MetricAndTagStore getStore(); @Override String toString();  }### Answer:
@Test public void testChunkContainsData() { assertTrue(chunk.containsDataInTimeRange(startTime - 1, endTime + 1)); assertTrue(chunk.containsDataInTimeRange(startTime + 1, endTime + 1)); assertTrue(chunk.containsDataInTimeRange(startTime + 1, endTime - 1)); assertTrue(chunk.containsDataInTimeRange(startTime - 1, endTime - 1)); assertTrue(chunk.containsDataInTimeRange(startTime, endTime)); assertTrue(chunk.containsDataInTimeRange(startTime, endTime - 1)); assertTrue(chunk.containsDataInTimeRange(startTime, endTime + 1)); assertTrue(chunk.containsDataInTimeRange(startTime + 1, endTime)); assertTrue(chunk.containsDataInTimeRange(startTime - 1, endTime)); assertFalse(chunk.containsDataInTimeRange(startTime - 10000, endTime - 10000)); assertFalse(chunk.containsDataInTimeRange(startTime + 10000, endTime + 10000)); }