How Does Swift Support Stubbing and Mocking? • Quality Coding

A test double is like a stunt double. When using a real object is unhelpful, it's good for a test to substitute a fake. But how do we do this in Swift?