In a large, heavy-based pan over medium heat, dry-roast the poppy seeds, coconut, chilli flakes, cardamom, cloves, fennel seeds, coriander seeds and cumin seeds for 3 or 4 minutes. Remove from heat and allow to cool.
When cool, add the ground cinnamon and blend the spices in a spice grinder or mortar and pestle. The coconut will make the spices stick together like a thick paste. Don't worry! Just break this up with a spoon before using.
In a large pan or wok, heat the oil and fry the onions until they are translucent. Add the ginger and garlic, stir to combine, and then add spice blend and star anise. Cook, stirring for a minute or two and then add ½ cup water to loosed the mixture.
Add the turmeric, chilli powder, salt and tomatoes, and stir to make a masala.
Add the chicken pieces and stir to ensure all pieces are well coated with the masala. Cover the pan and simmer on low for 30 minutes, or until chicken is tender.
When chicken is cooked, remove from heat and squeeze in the lime juice and stir through the chopped fresh coriander. Serve with steamed basmati rice.