@Test
public void selfMerge() throws Exception {

	File sourceFile1;
	File sourceFile2;
	File expectedOutputFile;
	File actualOutputFile;
	
	// Generate files.
	sourceFile1 = dataUtils.createDataFile("v0_6/merge/merge-in-1.osm");
	sourceFile2 = dataUtils.createDataFile("v0_6/merge/merge-in-1.osm");
	expectedOutputFile = dataUtils.createDataFile("v0_6/merge/merge-in-1.osm");
	actualOutputFile = dataUtils.newFile();
	
	// Run the merge.
	Osmosis.run(
		new String[] {
			"-q",
			"--read-xml-0.6", sourceFile2.getPath(),
			"--read-xml-0.6", sourceFile1.getPath(),
			"--merge",
			"--write-xml-0.6", actualOutputFile.getPath()
		}
	);
	
	// Validate that the output file matches the expected result.
	dataUtils.compareFiles(expectedOutputFile, actualOutputFile);
}