Adjust test environment.
Use pending instead of uploaded for initial state.
Add tests for upload model.