fix TextMessage referenceDepth init
add a assert message
add a nested message test(incorrect)
add randomUploadFile stub