refactored the unit tests for upload manager