Breeding. Most of these breeders hold back a male that they are unsure of which genes are in it and breed the following season. Thry will breed it to a normal female that produces a lot of eggs. Then when the babies hatch, they usually know. That's why most of the awesome 3 and 4 gene morphs you see for sale are a year old if it was difficult to tell what they were when they hatched.
As for hidden gene Womas, lessers, and Platty siblings, only the breeder who produced them knows what they are through breeding. They then sell them as what they are.