final HttpServletRequest req=ServletTestRunner.localRequest.get();
Host hh=new Host(req.getServerName(),"/webdav/autopub",req.getServerPort(),"admin@dotcms.com","admin",null,null);
Folder demo=(Folder)hh.child("demo.dotcms.com");
File f1=(File)demo.child(filename);
f1.rename(renamefilename);
Thread.sleep(1000);
File f2=(File)demo.child(renamefilename);
ByteArrayOutputStream out=new ByteArrayOutputStream();
f2.download(out, null);
Assert.assertEquals("this is a test text", out.toString());