Using a strainer, rinse beans. Place rinsed beans in a medium bowl, cover with water, and soak overnight.
Drain beans and rinse; put beans in a medium pot and cover with 6 inches of water. Add bay leaves and bring to a boil, skimming any foam that rises to the surface. Reduce heat to low and simmer 1 1/2 to 2 hours or until beans are tender. Season with salt and cook an additional 5 minutes. Drain beans and discard bay leaves.
Meanwhile, heat oil in a large skillet over medium heat. Add onion, carrot, and celery, season with salt and pepper, and stir frequently until vegetables are tender, about 10 minutes. Add garlic, anise seed, red pepper flakes, and lemon zest and cook for 1 minute.
Add beans and thyme to vegetables and cook for 10 minutes. Taste and adjust seasoning if necessary. Cool. Toss with parsley just before serving.