Badge generation with async callback testing