A full spray can has different sound characteristics from an empty can though. The contents delays the ball from hitting the can's walls. When full and unshaken, and you start shaking it then it takes a few shakes before it even starts making a noise.
So, the cavity would need to not just have the ball bearing, but also contain a viscous movement-damping liquid - and the cavity would need to be hermetically sealed, or otherwise you would get liquid spray all over your computer equipment.
No, I don't have anything better to do that to post stupid s**t...