@Test
public void testAddEntry() throws Exception {

	InputStream artifactContentStream = ArtificerArchiveTest.class.getResourceAsStream("sample.xsd");
	XsdDocument artifactMetaData = new XsdDocument();
	setMetaData(artifactMetaData, "sample.xsd", "1.0.3", "Just a sample XML Schema.");
	ArtificerArchive archive = null;
	try {
		archive = new ArtificerArchive();
		archive.addEntry("sample.xsd", artifactMetaData, artifactContentStream);
		File workDir = AtomTestUtils.getArchiveWorkDir(archive);
		Assert.assertNotNull(workDir);
		Assert.assertTrue(workDir.isDirectory());
		Collection<File> files = FileUtils.listFiles(workDir, new String[] {"xsd", "atom"}, true);
		Assert.assertEquals(2, files.size());
		Set<String> fnames = new HashSet<String>();
		for (File f : files) {
			fnames.add(f.getName());
		}
		Assert.assertTrue(fnames.contains("sample.xsd"));
		Assert.assertTrue(fnames.contains("sample.xsd.atom"));
	} finally {
		ArtificerArchive.closeQuietly(archive);
	}
}