Ash from Techpaedia.com was annoyed by his new MacBook shutting down randomly so he developed a simple test to see if a MacBook suffers from Random Shutdown Syndrome (RSS). To see if your MacBook has RSS:
1. Open Terminal
2. Type the following command and hit return: yes >/dev/null &
3. Repeat step #2 again in Terminal: yes >/dev/null &
The command yes is a seemingly useless command which sends an endless stream of y's to standard output. For more information on the innocuous "yes" command check out Matt Welsh's Web site.
The above commands will now be making use of both processor cores and shortly you'll hear the fans kick in pretty loudly. Keep Terminal open and running for at least 15 minutes.
If your MacBook suddenly shuts down, then you're affected by the problem and you need to contact Apple. If it does not shut down after 15 minutes, then quit Terminal (your fans will slowly disengage) and wait another 20 minutes. If you have a problem the machine will usually randomly shut down during this period.
If you still haven't experienced the bug you should re-run the above steps at least two more times. If your machine doesn't shut down by this point, you're most likely in the clear.
If your MacBook shuts down randomly you should contact Apple Care (1-800-APL-CARE) or make an appointment the Genius Bar at your local Apple Store to have it checked out.
There is also a video of a MacBook shutting down randomly on YouTube.