@Test
public void testWithAbsoluteTime() {

	SliceTransform transform = new SliceTransform();
	
	Metric actualMetric = new Metric(TEST_SCOPE, TEST_METRIC);
	Map<Long, Double> actualDps = new HashMap<Long, Double>();
	actualDps.put(1l, 1d);
	actualDps.put(2l, 2d);
	actualDps.put(3l, 3d);
	actualDps.put(4l, 4d);
	actualDps.put(5l, 5d);
	
	actualMetric.setDatapoints(actualDps);
	
	List<String> constants = new ArrayList<String>();
	constants.add("2");
	constants.add("4");
	
	QueryContext context = new QueryContext();
	
	QueryContext childContext = new QueryContext();
	TSDBQueryExpression exp = new TSDBQueryExpression();
	exp.setStartTimestamp(1l);
	exp.setEndTimestamp(6l);
	childContext.setExpression(exp);
	
	context.setChildContexts(Arrays.asList(childContext)); 
	
	List<Metric> actual = transform.transform(context, Arrays.asList(actualMetric),constants);
	
	Metric expectedMetric = new Metric(TEST_SCOPE, TEST_METRIC);
	Map<Long, Double> expectedDps = new HashMap<Long, Double>();
	expectedDps.put(2l, 2d);
	expectedDps.put(3l, 3d);
	expectedDps.put(4l, 4d);
	
	expectedMetric.setDatapoints(expectedDps);
	
	List<Metric> expected = Arrays.asList(expectedMetric);
	
	assertEquals(expected.get(0), actual.get(0));
	assertEquals(expected.get(0).getDatapoints(), actual.get(0).getDatapoints());
}