I believe it is OK to shuffle your feet and test the sand when you are over your ball in a bunker and preparing to swing.  However, I was surprised to see a player get in a bunker and test the sand by shuffling his feet  and he was no where near the ball.  What is the rule?