@Test
public void testEndToEndDuration() throws Exception {

	long duration = 123912931293L;
	long triggerTimestamp = 10123;
	long failureTimestamp = triggerTimestamp + duration;
	Map<JobVertexID, TaskStateStats> taskStats = new HashMap<>();
	JobVertexID jobVertexId = new JobVertexID();
	taskStats.put(jobVertexId, new TaskStateStats(jobVertexId, 1));
	FailedCheckpointStats failed = new FailedCheckpointStats(
		0,
		triggerTimestamp,
		CheckpointProperties.forStandardCheckpoint(),
		1,
		taskStats,
		0,
		0,
		0,
		failureTimestamp,
		null,
		null);
	assertEquals(duration, failed.getEndToEndDuration());
}