@@ -0,0 +1,1286 @@
+package com.groupon.lex.metrics.timeseries;%0A%0Aimport com.groupon.lex.metrics.history.CollectHistory;%0Aimport java.util.stream.Stream;%0Aimport org.joda.time.DateTime;%0Aimport org.joda.time.DateTimeZone;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertSame;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport static org.mockito.Mockito.when;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class ChainingTSCPairTest %7B%0A    @Mock%0A    private CollectHistory history;%0A    @Mock%0A    private TimeSeriesCollection current;%0A%0A    private static final DateTime TS0 = DateTime.now(DateTimeZone.UTC);%0A%0A    @Before%0A    public void setup() %7B%0A        when(current.getTimestamp()).thenReturn(TS0);%0A        when(history.streamReversed()).thenReturn(Stream.empty());%0A    %7D%0A%0A    @Test%0A    public void emptyHistoryTest() %7B%0A        ChainingTSCPair tsdata = new ChainingTSCPair(history, ExpressionLookBack.EMPTY) %7B%0A            @Override%0A            public TimeSeriesCollection getCurrentCollection() %7B%0A                return current;%0A            %7D%0A        %7D;%0A%0A        assertEquals(1, tsdata.size());%0A        assertSame(current, tsdata.getPreviousCollection(0).get());%0A    %7D%0A%7D%0A

Improve engine coverage.