	 @Test public void testArchiveDuplicateEntry (@TempDir Path tempDir)
		 throws IOException, ArchiveException, CompressorException {

		  String someFilename = "some-file.txt";
		  Path someFilePath = tempDir.resolve(someFilename);
		  Files.write(someFilePath, "Hello world\n".getBytes(StandardCharsets.UTF_8));
		  Path archiveZip = tempDir.resolve("archive.zip");

		  // Create an archive, add entry, update file, add same entry
		  try (OutputStream fileOutputStream = new BufferedOutputStream(Files.newOutputStream(archiveZip));
			  ArchiveOutputStream archiveOutputStream = new ArchiveStreamFactory()
				  .createArchiveOutputStream(ZIP.getCommonsCompressName(), fileOutputStream)) {

				// Create an entry for some file
				ArchiveEntry entry = archiveOutputStream.createArchiveEntry(someFilePath.toFile(), someFilename);
				archiveOutputStream.putArchiveEntry(entry);
				Files.copy(someFilePath, archiveOutputStream);
				archiveOutputStream.closeArchiveEntry();

				// Update some file, and put it into the archive again
				Files.write(someFilePath, "Good bye\n".getBytes(StandardCharsets.UTF_8));
				entry = archiveOutputStream.createArchiveEntry(someFilePath.toFile(), someFilename);
				archiveOutputStream.putArchiveEntry(entry);
				Files.copy(someFilePath, archiveOutputStream);
				archiveOutputStream.closeArchiveEntry();

				archiveOutputStream.finish();
		  }

		  Path extractionDirectory = tempDir.resolve("extract");
		  Files.createDirectories(extractionDirectory);
		  ArchiveUtils.extractArchive(archiveZip, extractionDirectory);

		  assertEquals(new String(Files.readAllBytes(tempDir.resolve(someFilename)), StandardCharsets.UTF_8),
			  new String(Files.readAllBytes(extractionDirectory.resolve(someFilename)), StandardCharsets.UTF_8),
			  "Extracted file contents should have matched original");
	 }