@Test
public void testImportTaskGraph() {

	List<String> in = Arrays.asList("PERIOD 300", "TASK t0_0	TYPE 1", "TASK t0_1	TYPE 2", "TASK t0_2	TYPE 2",
			"TASK t0_3	TYPE 2",
			"# a comment",
			"ARC a0_0 	FROM t0_0  TO  t0_1 TYPE 0", "ARC a0_1 	FROM t0_1  TO  t0_2 TYPE 0",
			"ARC a0_2 	FROM t0_0  TO  t0_3 TYPE 1", "HARD_DEADLINE d0_0 ON t0_2 AT 300",
			"SOFT_DEADLINE d0_1 ON t0_3 AT 200", "}");
	Iterator<String> it = in.iterator();
	Application<Task, Dependency> application = new Application<Task, Dependency>();
	String line = "@TASK_GRAPH 0 test";
	new ReaderTGFF().importTaskGraph(line, it, application);
	Assert.assertNotNull(application);
	Assert.assertEquals(7, application.getVertexCount());
	Assert.assertEquals(6, application.getEdgeCount());
	List<String> ids = new ArrayList<String>(
			Arrays.asList("t0_0_0", "t0_1_0", "t0_2_0", "t0_3_0", "a0_0", "a0_1", "a0_2"));
	for (Task task : application.getVertices()) {
		Assert.assertTrue(ids.contains(task.getId()));
	}
	List<String> edges = new ArrayList<String>(
			Arrays.asList("a0_0_0", "a0_0_1", "a0_1_0", "a0_1_1", "a0_2_0", "a0_2_1"));
	for (Dependency edge : application.getEdges()) {
		Assert.assertTrue(edges.contains(edge.getId()));
	}
}