@Test
public void testMetricListWithMultipeFillRangeOffsetNegative() {

    Transform fillTransform = new FillTransform();
    Map<Long, Double> datapoints_1 = new HashMap<Long, Double>();
    datapoints_1.put(1000L, 1.0);
    datapoints_1.put(3000L, 3.0);
    datapoints_1.put(6000L, 6.0);
    Metric metric_1 = new Metric(TEST_SCOPE, TEST_METRIC);
    metric_1.setDatapoints(datapoints_1);
    Map<Long, Double> datapoints_2 = new HashMap<Long, Double>();
    datapoints_2.put(1000L, 21.0);
    datapoints_2.put(3000L, 23.0);
    datapoints_2.put(6000L, 26.0);
    Metric metric_2 = new Metric(TEST_SCOPE, TEST_METRIC);
    metric_2.setDatapoints(datapoints_2);
    List<Metric> metrics = new ArrayList<Metric>();
    metrics.add(metric_1);
    metrics.add(metric_2);
    List<String> constants = new ArrayList<String>();
    constants.add("1s");
    constants.add("-1s");
    constants.add("100.0");
    constants.add(System.currentTimeMillis() + "");
    constants.add("false");
    Map<Long, Double> expected_1 = new HashMap<Long, Double>();
    expected_1.put(1000L, 100.0);
    expected_1.put(3000L, 100.0);
    expected_1.put(4000L, 100.0);
    expected_1.put(6000L, 6.0);
    Map<Long, Double> expected_2 = new HashMap<Long, Double>();
    expected_2.put(1000L, 100.0);
    expected_2.put(3000L, 100.0);
    expected_2.put(4000L, 100.0);
    expected_2.put(6000L, 26.0);
    List<Metric> result = fillTransform.transform(null, metrics, constants);
    assertEquals(result.size(), 2);
    assertEquals(result.get(1).getDatapoints().size(), 4);
    assertEquals(expected_1, result.get(0).getDatapoints());
    assertEquals(expected_2, result.get(1).getDatapoints());
}