### Question:
FileArchive extends AbstractReadableArchive implements WritableArchive { @Override public void open(URI uri) throws IOException { if (!uri.getScheme().equals("file")) { throw new IOException("Wrong scheme for FileArchive : " + uri.getScheme()); } this.uri = uri; archive = new File(uri); if (!archive.exists()) { throw new FileNotFoundException(uri.getSchemeSpecificPart()); } isOpenedOrCreated = true; staleFileManager = StaleFileManager.Util.getInstance(archive); }  @Override void open(URI uri); void open(String uri); @Override long getArchiveSize(); @Override void create(URI uri); @Override void closeEntry(WritableArchive subArchive); @Override void close(); @Override boolean delete(); @Override boolean isDirectory(String name); @Override Enumeration<String> entries(); @Override Collection<String> getDirectories(); Enumeration<String> entries(Enumeration embeddedArchives); @Override Enumeration<String> entries(String prefix); @Override boolean exists(); @Override ReadableArchive getSubArchive(String name); @Override WritableArchive createSubArchive(String name); @Override boolean exists(String name); @Override InputStream getEntry(String name); @Override long getEntrySize(String name); @Override Manifest getManifest(); @Override URI getURI(); @Override boolean renameTo(String name); boolean supportsElementsOverwriting(); boolean deleteEntry(String name); @Override void closeEntry(); @Override OutputStream putNextEntry(String name); @Override String getName(); static void clearCache(); static final Logger deplLogger; }### Answer:
@Test public void testCreateWithOlderLeftoverEntryAndThenOpen() throws Exception { if (! OS.isWindows()) { System.out.println("Skipping (as successful) testCreateWithOlderLeftoverEntryAndThenOpen because this is not a Windows system"); return; } System.out.println("testCreateWithOlderLeftoverEntryAndThenOpen"); createWithOlderLeftoverEntry(usualEntryNames); final FileArchive openedArchive = new FileArchive(); openedArchive.open(archiveDir.toURI()); System.err.println("A WARNING should appear next"); checkArchive(openedArchive, usualExpectedEntryNames); }
@Test public void testOpenWithPreexistingDir() throws Exception { System.out.println("testOpenWithPreexistingDir"); createPreexistingDir(); final FileArchive openedArchive = new FileArchive(); openedArchive.open(archiveDir.toURI()); checkArchive(openedArchive, usualExpectedEntryNames); }