Season the duck legs with salt and pepper. Heat a small stock pot to high. Sear the duck legs (no added oil) on both sides until brown. Remove legs and leave the rendered fat. Add the black beans, garlic and ginger and saute until soft, about 2 minutes. Add the onions and caramelize, about 4 to 5 minutes. Add the carrots, celery, shiitakes and season. Deglaze with shaoxing and reduce by 20 percent. Add the soy, sugar, thyme and duck legs and cover with water. Check for seasoning. Bring to a simmer and cook for 1 1/2 hours until soft. Strain duck legs and liquid and set aside. Bring liquid back to a boil and reduce by 50 percent. Skim if necessary. When legs are cool enough to touch, remove the meat and fat. Roughly chop up this mixture and mix in the strained vegetables/aromatics. In 4 individual oval flameproof baking dishes, place duck mixture in each. Ladle a little of the reduced liquid on top and top that with the mashers. All this can be done in advance. Bake in a preheated 400 degree oven for 30 minutes until bubbling. Change over to broiler and toast the top until brown. May serve with side salad.
PLATING: Place baking dish on a plate with a side salad (optional). Otherwise, you can make 8 small dishes and serve as an appetizer.