Adding unit tests for upload business logic