@Test(expected = IllegalArgumentException.class)
public void testDownsampleTransformWithIllegalUnit() {

    Transform downsampleTransform = new DownsampleTransform();
    Map<Long, Double> datapoints = new HashMap<Long, Double>();
    datapoints.put(1000L, 1.0);
    Metric metric = new Metric(TEST_SCOPE, TEST_METRIC);
    metric.setDatapoints(datapoints);
    List<Metric> metrics = new ArrayList<Metric>();
    metrics.add(metric);
    List<String> constants = new ArrayList<String>();
    constants.add("2k-avg");
    downsampleTransform.transform(null, metrics, constants);
}