// Path: src/test/java/com/lassekoskela/maven/timeline/ObjectBuilder.java
// public static Goal goal(String name, long duration, long startTime, String... dependencies) {
// 	return new Goal(name, new Duration(duration), startTime, asList(dependencies));
// }
// 
// Path: src/test/java/com/lassekoskela/maven/timeline/ObjectBuilder.java
// public static Phase phase(String name, Goal... goals) {
// 	return new Phase(name, asList(goals));
// }
// 
// Path: src/test/java/com/lassekoskela/maven/timeline/ObjectBuilder.java
// public static Project project(String name, Phase... phases) {
// 	return new Project(name, asList(phases));
// }
// 
// Path: src/main/java/com/lassekoskela/maven/bean/Timeline.java
// public class Timeline {
// 
// 	private final Iterable<Project> projects;
// 
// 	public Timeline(Iterable<Project> projects) {
// 		this.projects = projects;
// 	}
// 
// 	public Iterable<Project> getProjects() {
// 		return projects;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(projects);
// 	}
// 
// 	@Override
// 	public boolean equals(Object object) {
// 		if (object instanceof Timeline) {
// 			Timeline that = (Timeline) object;
// 			return Objects.equal(this.projects, that.projects);
// 		}
// 		return false;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this).add("projects", projects).toString();
// 	}
// }
// 
// Path: src/main/java/com/lassekoskela/maven/timeline/GoalOrganizer.java
// public static class DisplayableGoal {
// 
// 	private final String projectId;
// 	private final String phaseId;
// 	private final String goalId;
// 	private final String dependencies;
// 	private final long leftPosition;
// 	private final long topPosition;
// 	private final long heightPosition;
// 
// 	@VisibleForTesting
// 	DisplayableGoal(String projectId, String phaseId, String goalId, String dependencies, long leftPosition,
// 			long topPosition, long heightPosition) {
// 
// 		this.projectId = projectId;
// 		this.phaseId = phaseId;
// 		this.goalId = goalId;
// 		this.dependencies = dependencies;
// 		this.leftPosition = leftPosition;
// 		this.topPosition = topPosition;
// 		this.heightPosition = heightPosition;
// 	}
// 
// 	public String getProjectId() {
// 		return projectId;
// 	}
// 
// 	public String getPhaseId() {
// 		return phaseId;
// 	}
// 
// 	public String getGoalId() {
// 		return goalId;
// 	}
// 
// 	public String getDependencies() {
// 		return dependencies;
// 	}
// 
// 	public long getLeftPosition() {
// 		return leftPosition;
// 	}
// 
// 	public long getTopPosition() {
// 		return topPosition;
// 	}
// 
// 	public long getHeightPosition() {
// 		return heightPosition;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects
// 				.hashCode(projectId, phaseId, goalId, dependencies, leftPosition, topPosition, heightPosition);
// 	}
// 
// 	@Override
// 	public boolean equals(Object object) {
// 		if (object instanceof DisplayableGoal) {
// 			DisplayableGoal that = (DisplayableGoal) object;
// 			return Objects.equal(this.projectId, that.projectId) && Objects.equal(this.phaseId, that.phaseId)
// 					&& Objects.equal(this.goalId, that.goalId)
// 					&& Objects.equal(this.dependencies, that.dependencies)
// 					&& Objects.equal(this.leftPosition, that.leftPosition)
// 					&& Objects.equal(this.topPosition, that.topPosition)
// 					&& Objects.equal(this.heightPosition, that.heightPosition);
// 		}
// 		return false;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this).add("projectId", projectId).add("phaseId", phaseId)
// 				.add("goalId", goalId).add("dependencies", dependencies).add("leftPosition", leftPosition)
// 				.add("topPosition", topPosition).add("heightPosition", heightPosition).toString();
// 	}
// }


import static com.lassekoskela.maven.timeline.ObjectBuilder.goal;
import static com.lassekoskela.maven.timeline.ObjectBuilder.phase;
import static com.lassekoskela.maven.timeline.ObjectBuilder.project;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static org.custommonkey.xmlunit.XMLUnit.buildControlDocument;
import static org.custommonkey.xmlunit.XMLUnit.buildTestDocument;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.custommonkey.xmlunit.XMLUnit;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.lassekoskela.maven.bean.Timeline;
import com.lassekoskela.maven.timeline.GoalOrganizer.DisplayableGoal;
package com.lassekoskela.maven.timeline;





public class ExporterTest {

	private String basename;
	private File exportFile;
	private Exporter exporter;

	@Before
	public void configureXmlUnit() throws Exception {
		XMLUnit.setIgnoreWhitespace(true);
	}

	@Before
	public void deletePreviousExportFile() throws Exception {
		basename = "timeline.html";
		exportFile = new File("target", basename);
		if (exportFile.exists() && exportFile.isDirectory()) {
			for (File innerFile : exportFile.listFiles()) {
				innerFile.delete();
			}
			exportFile.delete();
		}
	}

	@Before
// Path: src/test/java/com/lassekoskela/maven/timeline/ObjectBuilder.java
// public static Goal goal(String name, long duration, long startTime, String... dependencies) {
// 	return new Goal(name, new Duration(duration), startTime, asList(dependencies));
// }
// 
// Path: src/test/java/com/lassekoskela/maven/timeline/ObjectBuilder.java
// public static Phase phase(String name, Goal... goals) {
// 	return new Phase(name, asList(goals));
// }
// 
// Path: src/test/java/com/lassekoskela/maven/timeline/ObjectBuilder.java
// public static Project project(String name, Phase... phases) {
// 	return new Project(name, asList(phases));
// }
// 
// Path: src/main/java/com/lassekoskela/maven/bean/Timeline.java
// public class Timeline {
// 
// 	private final Iterable<Project> projects;
// 
// 	public Timeline(Iterable<Project> projects) {
// 		this.projects = projects;
// 	}
// 
// 	public Iterable<Project> getProjects() {
// 		return projects;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hashCode(projects);
// 	}
// 
// 	@Override
// 	public boolean equals(Object object) {
// 		if (object instanceof Timeline) {
// 			Timeline that = (Timeline) object;
// 			return Objects.equal(this.projects, that.projects);
// 		}
// 		return false;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this).add("projects", projects).toString();
// 	}
// }
// 
// Path: src/main/java/com/lassekoskela/maven/timeline/GoalOrganizer.java
// public static class DisplayableGoal {
// 
// 	private final String projectId;
// 	private final String phaseId;
// 	private final String goalId;
// 	private final String dependencies;
// 	private final long leftPosition;
// 	private final long topPosition;
// 	private final long heightPosition;
// 
// 	@VisibleForTesting
// 	DisplayableGoal(String projectId, String phaseId, String goalId, String dependencies, long leftPosition,
// 			long topPosition, long heightPosition) {
// 
// 		this.projectId = projectId;
// 		this.phaseId = phaseId;
// 		this.goalId = goalId;
// 		this.dependencies = dependencies;
// 		this.leftPosition = leftPosition;
// 		this.topPosition = topPosition;
// 		this.heightPosition = heightPosition;
// 	}
// 
// 	public String getProjectId() {
// 		return projectId;
// 	}
// 
// 	public String getPhaseId() {
// 		return phaseId;
// 	}
// 
// 	public String getGoalId() {
// 		return goalId;
// 	}
// 
// 	public String getDependencies() {
// 		return dependencies;
// 	}
// 
// 	public long getLeftPosition() {
// 		return leftPosition;
// 	}
// 
// 	public long getTopPosition() {
// 		return topPosition;
// 	}
// 
// 	public long getHeightPosition() {
// 		return heightPosition;
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects
// 				.hashCode(projectId, phaseId, goalId, dependencies, leftPosition, topPosition, heightPosition);
// 	}
// 
// 	@Override
// 	public boolean equals(Object object) {
// 		if (object instanceof DisplayableGoal) {
// 			DisplayableGoal that = (DisplayableGoal) object;
// 			return Objects.equal(this.projectId, that.projectId) && Objects.equal(this.phaseId, that.phaseId)
// 					&& Objects.equal(this.goalId, that.goalId)
// 					&& Objects.equal(this.dependencies, that.dependencies)
// 					&& Objects.equal(this.leftPosition, that.leftPosition)
// 					&& Objects.equal(this.topPosition, that.topPosition)
// 					&& Objects.equal(this.heightPosition, that.heightPosition);
// 		}
// 		return false;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return Objects.toStringHelper(this).add("projectId", projectId).add("phaseId", phaseId)
// 				.add("goalId", goalId).add("dependencies", dependencies).add("leftPosition", leftPosition)
// 				.add("topPosition", topPosition).add("heightPosition", heightPosition).toString();
// 	}
// }


// Path: src/test/java/com/lassekoskela/maven/timeline/ExporterTest.java
import static com.lassekoskela.maven.timeline.ObjectBuilder.goal;
import static com.lassekoskela.maven.timeline.ObjectBuilder.phase;
import static com.lassekoskela.maven.timeline.ObjectBuilder.project;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static org.custommonkey.xmlunit.XMLUnit.buildControlDocument;
import static org.custommonkey.xmlunit.XMLUnit.buildTestDocument;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.custommonkey.xmlunit.XMLUnit;
import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.lassekoskela.maven.bean.Timeline;
import com.lassekoskela.maven.timeline.GoalOrganizer.DisplayableGoal;

package com.lassekoskela.maven.timeline;





public class ExporterTest {

	private String basename;
	private File exportFile;
	private Exporter exporter;

	@Before
	public void configureXmlUnit() throws Exception {
		XMLUnit.setIgnoreWhitespace(true);
	}

	@Before
	public void deletePreviousExportFile() throws Exception {
		basename = "timeline.html";
		exportFile = new File("target", basename);
		if (exportFile.exists() && exportFile.isDirectory()) {
			for (File innerFile : exportFile.listFiles()) {
				innerFile.delete();
			}
			exportFile.delete();
		}
	}

	@Before
	public void createAnExporter() throws FileNotFoundException {