Preheat oven to 425 degrees F (220 degrees C). Slice cod fillet in half horizontally to yield 2 thin slices; set aside.
In a skillet over medium heat, melt butter. Stir in onion and mushrooms, and cook until softened, 3-5 minutes. Season with salt and pepper; set aside to cool slightly.
In a medium bowl, blend the pate and cream. Mix in onions and mushrooms.
On a lightly floured surface, roll out the pastry to make 12×14 inch rectangle. Place 1 slice of the cod fillet in the center of the rectangle. Spread with 1/2 the pate mixture and layer with the other piece of fillet. Spread remaining pate mixture on top. Fold pastry edges over the filling towards the center, and seal with egg. Brush pastry on all sides with egg.
Bake 25 minutes in the preheated oven, or until golden brown. Serve warm.