Revert "Revert "TestAddFile""

This reverts commit 1c6af6f18e0f1bdcbf45ada96d15794b1604b49a.