}
files = file.list();
assertEquals("we should have no temp file", files.length, 0);
}
public void testCacheStreamToFileAndNotCloseStream() throws IOException {
<BUG>CachedOutputStream cos = new CachedOutputStream(16);

cos.setOutputDir(file);
cos.write(TEST_STRING.getBytes("UTF-8"));
String[] files = file.list();</BUG>
assertEquals("we should have a temp file", files.length, 1);

}
files = file.list();
assertEquals("we should have no temp file", files.length, 0);
}
public void testCacheStreamToFileAndNotCloseStream() throws IOException {
CachedOutputStream cos = new CachedOutputStream(exchange);
cos.write(TEST_STRING.getBytes("UTF-8"));
File file = new File("./target/cachedir");
String[] files = file.list();
assertEquals("we should have a temp file", files.length, 1);
