What symptoms are you experiencing?
It's sometimes difficult even for a pro with proper tools to diagnose a CDI that's going bad - because it takes a power load to create the problem.
Once they're bad, then yes, it's easy to test!
But they can narrow down the problem by testing the stator, coils, etc. However, this can take time and sometimes be more expensive than the parts they replace.
Usually, if it's a CDI, the bike will start and run okay, but start cutting out and progressively running worse as it gets warmer -- to the point where it won't run at all until it cools down. Once it's cool, you can restart and it'll go through the same cycle again.
These symptoms keep getting worse - shorter period between okay startup and cutting out - and the engine shuts down quicker -- until finally the bike won't start at all.
If these aren't the symptoms you're experiencing, it's most likely NOT the CDI.