Preheat the oven to 350F.
Bring a large pot of salted water to a boil. While it's heating, rinse the green beans and trim the stems.
Wash the green beans, then trim the ends and cut into 2-inch pieces. Add the beans to the water and return to a boil. Cook for about 5 minutes, until tender-crisp. Remove from water and immediately place in an icewater bath to stop the cooking. Once cool, drain in a colander and set aside.
In a large, non-stick skillet, heat the olive oil on medium-heat. Add the onion and fennel and sauté until the onion is translucent, about five minutes.
Add the mushrooms and continue cooking, stirring frequently. Add the salt and pepper.
Once the mushrooms have released their juices and shrunk (about 5-6 minutes), sprinkle in the flour and continue stirring for another minute, so the flour mixes in and absorbs some of the juices.
Mix in the sour cream and shredded cheese. Once the sour cream has softened and the cheddar has melted, mix in the green beans. Stir until everything is evenly coated.
Scoop the entire mixture into a 9" x 9" casserole dish and use a spatula or spoon to level it all out. Sprinkle the almonds on top.
Place in the oven, uncovered, and bake for 35-45 minutes, until heated and bubbly and the almonds are lightly toasted.