Added test for CopyTo when the end of stream is reached.