We know about stunt doubles—a trained replacement used for dangerous action sequences in movies, like jumping out of the Empire State Building, a fight sequence on top of a burning train, jumping from an airplane, or similar actions, mainly fight scenes. Stunt doubles are used to protect the elite real actors or when the actor is not available.
Similarly, sometimes it is not possible to unit test a code because of the unavailability of collaborator objects or the cost of instantiation for the collaborator.
If a code is dependent on database access, it is not possible to unit test the code unless the database is available, or if my code needs to send information to a printer and my machine is not connected to LAN.
Test doubles ...