### Question:
JarArchive implements Archive { public String getName() { return JarArchive.getName(getURI()); }  Enumeration<String> entries(String prefix); String getName(); boolean exists(String name); boolean isDirectory(String name); void setParentArchive(ReadableArchive parentArchive); ReadableArchive getParentArchive(); synchronized U getExtraData(Class<U> dataType); synchronized void setExtraData(Class<U> dataType, U instance); synchronized void removeExtraData(Class<U> dataType); void addArchiveMetaData(String metaDataKey, Object metaData); T getArchiveMetaData(String metaDataKey, Class<T> metadataType); void removeArchiveMetaData(String metaDataKey);  }### Answer:
@Test public void shortSubPaths() { try { URI uri = new URI("jar: assertEquals("d", JarArchive.getName(uri)); } catch (URISyntaxException ex) { fail("URI improperly formated" + ex.getInput()); } }
@Test public void noFileType() { try { URI uri = new URI("jar: assertEquals("x", JarArchive.getName(uri)); } catch (URISyntaxException ex) { fail("URI improperly formated" + ex.getInput()); } }
@Test public void trailingDot() { try { URI uri = new URI("jar: assertEquals("z", JarArchive.getName(uri)); } catch (URISyntaxException ex) { fail("URI improperly formated" + ex.getInput()); } }
@Test public void multipleDots() { try { URI uri = new URI("jar: assertEquals("this.is.my", JarArchive.getName(uri)); } catch (URISyntaxException ex) { fail("URI improperly formated" + ex.getInput()); } }