test casting integration and check that classes are not used as roles