@Test
public void testRateWithMissingFirstNLastDP() {

	long startTime=1*MINUTE, endTime=10*MINUTE;
	RateTransform rateTransform = new RateTransform();
	List<Metric> metrics = new ArrayList<>();
	Metric actualMetric= new Metric("testScope", "testMetric");
	Map<Long, Double> actualDPs = new HashMap<>();
	actualDPs.put(4*MINUTE, 4d);
	actualDPs.put(5*MINUTE, 5d);
	actualMetric.setDatapoints(actualDPs);
	metrics.add(actualMetric);
	List<Metric> expectedMetrics = new ArrayList<>();
	Metric expectedMetric= new Metric("testScope", "testMetric");
	Map<Long, Double> expectedDPs = new HashMap<>();
	for(int i=2;i<=10;i++) {
		expectedDPs.put(i*MINUTE, 1d);
	}
	expectedMetric.setDatapoints(expectedDPs);
	expectedMetrics.add(expectedMetric);
	List<String> constants = Arrays.asList("1m","FALSE","TRUE");
	QueryContext queryContext = _getQueryContext(startTime, endTime);
	List<Metric> actualMetrics = rateTransform.transform(queryContext, metrics,constants);
	assertEquals(expectedMetrics.get(0).getDatapoints(), actualMetrics.get(0).getDatapoints());
}