}
public void testEmptyDocumentEventWithFriend() throws IOException {
POIFSFileSystem fs = new POIFSFileSystem();
DirectoryEntry dir = fs.getRoot();
dir.createDocument("Bar", 1, new POIFSWriterListener() {
public void processPOIFSWriterEvent(POIFSWriterEvent event) {
try {
event.getStream().write(0);
} catch (IOException exception) {
throw new RuntimeException("exception on write: " + exception);
}
}
});
dir.createDocument("Foo", 0, new POIFSWriterListener() {
public void processPOIFSWriterEvent(POIFSWriterEvent event) {
}
});
ByteArrayOutputStream out = new ByteArrayOutputStream();