Combine the beans, tomatoes, mozzarella, and onion in a medium bowl.
Put the olive oil, balsamic, garlic, and rosemary in a jar with a tight fitting lid. Cover and shake until completely blended. Taste and add salt and pepper to your liking.
Pour the dressing over the vegetable mixture and toss gently to coat. Refrigerate for at least 30 minutes and as much as several hours.
Just before your are ready to serve, tear the basil gently and add it to the salad. Toss everything once more. Taste and add salt and pepper if needed. Serve.