I use the factory design pattern and therefore cast very often in the ABL. Never had any issue with it. What exactly is it that you want to achieve with your test?
You don't need to cast to find out the type of an object: The type-of function is your friend.
Code:
type-of ( object-reference , object-type-name ).
Heavy Regards, RealHeavyDude.