Place the sweet potatoes on a baking tray, and rub lightly with a dash of oil. Roast at 190°C (Gas Mark 5 / 375°F) for around 45 minutes, until they're almost soft in the middle.
While the potatoes are roasting, prepare the pesto. Add the nuts, garlic, basil and olive oil to a mini food processor, and blitz thoroughly until smooth. Season to taste, and add enough water to give your desired consistency (I wanted a pourable pesto, so I added a few tablespoons of water).
To prepare the black beans, add them to a mixing bowl with the tomatoes, sweetcorn, parsley, garlic granules, salt and pepper. Drizzle with a little oil, and mix to combine.
When the potatoes are almost soft in the middle, add the black bean mixture to the baking tray, and return to the oven for a further 20 minutes. The beans should be slightly crispy, and the tomatoes will be soft and juicy.
Serve the roasted sweet potatoes topped with the roasted beans, and drizzled with pesto.