How can my PCs discover an NPC’s class if they are trying to hide it?

I’m pretty new to DMing and I’m working on writing a campaign in which it’s important to the plot that the characters not know at first that the BBEG is a multiclass wizard-warlock. Basically, this character is an Elf Prince who is widely known to be a modestly skilled wizard, but he’s also secretly taken on a warlock patron and is the leader of a small rebel cult.

Other than dropping hints about his patron, are there mechanics that can allow my PCs to discover his class, similar to a detect magic spell or an arcana check? I’d like to avoid relying on meta-knowledge like “oh, that’s a warlock spell” as much as possible.

Does this even make sense?