Bring the water to boil in a large pot. While it’s heating, cut up the beans. Add the salt and beans to the boiling water. Cover and cook for 6 minutes. Drain beans in a colander, and then spray for a minute with cold water to stop the cooking. Let them drain in the colander, shaking every now and then to get off all the water.
Trim and discard the mushroom stems and chop the mushrooms into pieces. Spray a non-stick pan with canola oil and heat it. Add the mushrooms, garlic, cayenne, salt, and pepper. Cook until mushrooms are very soft and exude their juices. Whisk the flour into the vegetable broth and add to the mushrooms along with the sherry. Simmer, stirring, until mixture thickens. Add the soy creamer and simmer until thick, about 5 to 10 minutes. Adjust the seasonings and stir in the beans.
Put the bread, margarine, salt, and pepper into a food processor and pulse until crumbly. Pour into a bowl and add the onions. Stir to combine.
Put the green beans into an oiled casserole dish and top with the onion mixture. Bake at 425 F for about 15 minutes. If you are not serving this right away, refrigerate the topping separately; bring to room temperature before sprinkling the topping on the casserole and baking for about 20 minutes or until hot throughout.