Cook the top of the egg: To be sure the whites are totally set on a sunny-side-up egg, you can cover the pan partway through cooking. The steam from the egg and the butter will gently cook the top. You can also flip the egg over and cook for a minute on the other side. This turns a sunny-side-up egg into an over-easy egg!