Cook the pasta in boiling salted water according to the instructions on the packet. Peel onion and garlic and dice finely. Heat 4 tablespoons of oil in a wide, shallow saucepan. Sauté the onion and garlic in it.
Add tomatoes, season with salt, pepper and sugar. Simmer for about 20 minutes.
Wash the basil, shake dry and pluck the leaves from the stems. Cut mozzarella into slices. Cut the sausage into small cubes. Put the pasta on a sieve and mix half of the sauce with the pasta.
Grease the bottom of an ovenproof dish with oil. Spread a piece of pasta on it. Add half of the basil leaves, sausage and mozzarella and put the rest of the pasta in the pan. Pour the rest of the sauce over it.
Grate the parmesan and pour over the casserole. Bake the casserole in a preheated oven (electric cooker: 175 °C/ convection oven: 150 °C/ gas: see manufacturer) for about 20 minutes.
Wash, clean and quarter the tomatoes. Heat 1 tablespoon of oil in a frying pan. Sauté the tomatoes. Season with salt and pepper. Put tomato quarters on the casserole and garnish with basil leaves.
Serve with coarse pepper.