I hope I've made it clear that even when you evaluate and choose adoptees according to your powers of observation and logical principles, it's still a crap shoot. In that case, your most important duty is to make sure none of it falls on you.
This sums up the situation with an unfriendly dog. Let me assure you that it's workable. For an intelligent cat who knows which way to leap, everything is workable.
In dealing with dogs, keep this fact foremost. Far more than a cat does, a dog seeks the approval and love of his master. Yes, it will make mistakes, sometimes on the rug, sometimes through the miscalculation of chewing a beloved sock, shoe, or slipper. A wise dog can extricate herself from such disasters with a soft-eyed, plaintive and the faintest of whines.
This, however, is not a guide for dogs. My point here is that your corpse isn't one of those mistakes from which a dog can extricate himself. You want to avoid such unpleasantness.
Take the attitude that you're in the midst of battlefield negotiations. This is no time for long speeches or flowery prose. Got for quick and to the point. If a dog is thinking of lunging at you, shriek at the top of your lungs, "I wouldn't if I were you! They'll send you to the pound." The mention of this frightful word should freeze a dog in mid-lunge.
The other reason you limit yourself to brief communication is that you must also prepare to activate Plan B. Know where the closest couch is and make sure the space beneath is large enough for hiding. If you are close to a human adoptee, calculate the distance to his or her lap.
Above all, unless your life depends on it, make no hostile gesture towards the dog. I'm sure I don't have to list all the swipes, growls, and other legitimate behavior you must avoid. Maintain your status as the innocent victim.
Make no comments as the humans chastise the dog. The dog will probably get the message, but don't turn your back on him until you've had some more negotiations. Establish with the dog that you're open to a friendly division of property, humans included. You won't eat his food (this is the easiest promise to make, because their food tastes awful), and you demand that he not eat yours (much harder for the dog, which is why you insist).
If he's already carved out the bed as his personal domain, don't argue in these early stages. You may actually prefer to sleep elsewhere, but later on you will want to establish that you have every right to occupy that space—or indeed, any and every space.
These, however, are the earliest days. Your task here is to establish civility and to demonstrate with every paw you lift, that you have a friendly and conciliatory spirit. It's like catnip in the bank in terms of investing in your future.