Here's a first pass at making ViewController a little more testable. I'm following the techniques I've outlined in Better Unit Testing with Swift, namely:
First, I made USPSManager conform to a new protocol, PackageManager. This allows us to create a mock for use under tests. Then, to make assertions easier, I moved the class methods to instance methods. Now the mock can record each parameter that was passed to it under test (and call the completion block with mock data!).
This required opening up the packageManager variable on ViewController. Ideally, this would be a let variable and injected via the initializer. However, I wasn't able to get this to work with storyboards so I figured a lazy-evaluated var was a good tradeoff.
Finally, the tests set up some mock package tracking information then assert that the table shows said data.
Use XCTAssertNotNil over assigning a variable
Remove commented out code (it's all in SC)
Make USPSRequestInfo equatable
Make USPSManager conform to PackageManager
Use instance methods over class methods
Make MockPackageManager for test assertions
Allow PackageManager to be injected into VC
Assert VC fetches info with correct package data
Type the PackageManager completion block
Assert that retrieved package info shows in table
👍 Looks great, thanks!