File file = new File("./target/cachedir");
String[] files = file.list();
assertEquals("we should have a temp file", files.length, 1);
assertTrue("The file name should start with cos" , files[0].startsWith("cos"));
StreamCache cache = cos.getStreamCache();
assertTrue("Should get the FileInputStreamCache", cache instanceof FileInputStreamCache);
String temp = toString((InputStream)cache);
assertEquals("Cached a wrong file", temp, TEST_STRING);
cache.reset();
temp = toString((InputStream)cache);
assertEquals("Cached a wrong file", temp, TEST_STRING);
exchange.getUnitOfWork().done(exchange);