Fix missing encoding for setting result of retrieving test documents.