In a medium saucepan over medium heat, saute onion until translucent. Stir in flour, milk, mozzarella cheese, cottage cheese, sugar and salt; cook, stirring, until thickened.
Place green beans in a 9x13 inch baking dish; pour cheese sauce over green beans.
In a small bowl combine bread crumbs and egg. Spread over green beans.