public void testWriteDirectory() throws IOException { URI file = store.writeEntry("dir/", tmp, "text/plain", new DataWriter() { public void store(OutputStream content) throws IOException { content.write("content".getBytes()); } }); store.infoEntry(file.getPath(), tmp, "text/plain", new DataInfo() { public void list(URI id, String media, long lastModified) throws IOException { assertEquals("text/plain", media); } }); store.readEntry(file.getPath(), tmp, "text/plain", null, new DataReader() { public void load(URI id, String media, InputStream content, long len) throws IOException { byte[] buf = new byte[1024]; assertEquals("content", new String(buf, 0, content.read(buf))); } }); store.deleteEntry(file.getPath(), tmp); store.deleteEntry("dir", tmp); }