spyOnClass tests