It looks as if the content is not available to the repo. Typically this happens because the dir.root property has not been set to a fixed location and the tests get run against the same database but from different locations. So the metadata is all there with the size and URL, but the stream is empty.
I know that this is after very long time. I have uploaded a file and modified my code to download the same. This simply says that my dir.root has not been changed bcoz I am working on same project. Stuck with number zero even now Im using Alfresco 3.4d version. Please do help on how to download the uploaded files. I am able to see the metadata and contentLength() but stream.available is returning zero.