lui is a personal pronoun (in Dative) that is also masculin and "ei" is the feminin equivalent, so yes, you can use it: Generația ei (as in her generation, not his generation). And "își" is a reflexive pronoun (also in Dative) that shows that the subject is also the owner of the object that they are talking about (cafeaua = the coffee)... so "Generația ei își bea cafeaua neagră" could be translated as "Her generation drinks its' coffee black"
So I looked this up. In BRITISH English a collective noun is more often treated as a plural for verb conjugation so
His generation DRINK black coffee.
should also be accepted. It is correct British English. While used less often in the US it is apparently not an absolute exclusion there either.
I have reported but post this to explain.
Pop60 You are correct. It is not even informal or colloquial, but standard good UK English to use this form, and the grammar books teach it. In British English you can choose to focus on the group as one entity and say, "his generation drinks"- thinking of them as one single group; but we can- and usually do- focus on the many individuals that make up the group and choose grammar to match, and say, "his generation drink".
This applies to any groups, teams, bands, classes, families, and organisations and brands. In UK Eng, it's good English to say "Ikea are a great company", "Real Madrid are a fine team", "ACDC are a band", "My class are friendly", "My family are lovely", "the school are great"- in all of these cases thinking of the people who make up those groups, rather than about the brand, etc. This would not be acceptable in US English.
I don't think anyone expects Duo to teach UK Eng, but it should accept good UK, Canadian, Australian, etc English over time :)
The big question is whether this happens in Romanian or not.